We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59ec204 commit 7154337Copy full SHA for 7154337
libraries/Wire/Wire.cpp
@@ -93,6 +93,7 @@ uint8_t arduino::MbedI2C::endTransmission(void) {
93
94
size_t arduino::MbedI2C::requestFrom(uint8_t address, size_t len, bool stopBit) {
95
char buf[256];
96
+ len = min(len, sizeof(buf));
97
int ret = master->read(address << 1, buf, len, !stopBit);
98
if (ret != 0) {
99
return 0;
0 commit comments