Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork219
Closed
Description
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
size_tarduino::MbedI2C::requestFrom(uint8_t address,size_t len,bool stopBit) {char buf[256];int ret = master->read(address <<1, buf, len, !stopBit);if (ret !=0) {return0;}for (size_t i=0; i<len; i++) {rxBuffer.store_char(buf[i]);}return len;}