Skip to content

spiTransferBytesNL() writes past end of data_out #4935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
erikboto opened this issue Mar 12, 2021 · 1 comment
Closed

spiTransferBytesNL() writes past end of data_out #4935

erikboto opened this issue Mar 12, 2021 · 1 comment

Comments

@erikboto
Copy link

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.

@me-no-dev
Copy link
Member

Done :) thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants