Skip to content

spiTransferBytesNL() writes past end of data_out #4935

Closed
@erikboto

Description

@erikboto

spiTransferBytesNL(spi_t * spi, const void * data_in, uint8_t * data_out, uint32_t len) will write too much data when len is not a factor of 4.

Since it copies word by word from the SPI buffer, it will write 0-3 bytes more then len bytes into data_out. I couldn't see any mention of this, and the non-NL version spiTransferBytes() does not suffer from the same limitation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions