Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bounds checks in BMI270 driver in
bulk_read
(#362)
Both i and bytes_to_read are size_t, which are unsigned long. `i - bytes_to_read` should have been `bytes_to_read - i` for how many bytes are left in the buffer. But since we're dealing with unsigned values, it's safer to only do additions and comparisons.
- Loading branch information