I ran into a hardfault when reading Smart Battery data with SMBus::block_read.
The fault is triggered in line 126 of
when memcpy writes beyond the end of the buffer “data” provided by the caller.
In my case the smbus device returned a byte count larger than the requested length (13 instead of 8 bytes).
I fixed this by adding a check for the length limit before the memcpy call, see
Should I open a pull request?