Skip to content

Commit 89d6b89

Browse files
kfitzgeraldme-no-dev
authored andcommitted
Fixed missing null terminator in EEPROM.readString(address, value, maxLen) (#2439)
1 parent 010a7c6 commit 89d6b89

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: libraries/EEPROM/src/EEPROM.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ size_t EEPROMClass::readString (int address, char* value, size_t maxLen)
279279
return 0;
280280

281281
memcpy((uint8_t*) value, _data + address, len);
282+
value[len] = 0;
282283
return len;
283284
}
284285

0 commit comments

Comments
 (0)