mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-16 00:43:00 +03:00
Avoid copying past end of buffer in String.concat (#8198)
This commit is contained in:
committed by
GitHub
parent
a105bdd359
commit
2946ce055c
@ -305,7 +305,7 @@ bool String::concat(const char *cstr, unsigned int length) {
|
||||
return true;
|
||||
if (!reserve(newlen))
|
||||
return false;
|
||||
memmove_P(wbuffer() + len(), cstr, length + 1);
|
||||
memmove_P(wbuffer() + len(), cstr, length);
|
||||
setLen(newlen);
|
||||
wbuffer()[newlen] = 0;
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user