You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah this looks like a buffer overflow to me.
And actually, looking at the code, I think that Wire could be changed to use Mbed's single-byte I2C API. This would mean that the we wouldn't read the bytes and buffer them, we would instead read each byte one-by-one in arduino::MbedI2C::read().
The relevant code is in the link below. The buffer size is 256 but the the method accepts a size_t len. What happens if len is greater than 256?
https://github.com/arduino/ArduinoCore-mbed/blob/main/libraries/Wire/Wire.cpp#L94
The text was updated successfully, but these errors were encountered: