From 89d6b895d1d3758eee58900d7d81ad1195690f09 Mon Sep 17 00:00:00 2001 From: Kevin M Fitzgerald Date: Thu, 14 Feb 2019 12:31:37 -0600 Subject: [PATCH] Fixed missing null terminator in EEPROM.readString(address, value, maxLen) (#2439) --- libraries/EEPROM/src/EEPROM.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/EEPROM/src/EEPROM.cpp b/libraries/EEPROM/src/EEPROM.cpp index 0e91f987..ab1f7c8a 100644 --- a/libraries/EEPROM/src/EEPROM.cpp +++ b/libraries/EEPROM/src/EEPROM.cpp @@ -279,6 +279,7 @@ size_t EEPROMClass::readString (int address, char* value, size_t maxLen) return 0; memcpy((uint8_t*) value, _data + address, len); + value[len] = 0; return len; }