mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Fixed an access violation in DynamicJsonBuffer when memory allocation fails (issue #433)
This commit is contained in:
@@ -84,7 +84,7 @@ class DynamicJsonBufferBase
|
||||
char* newStart =
|
||||
static_cast<char*>(_parent->allocInNewBlock(_length + 1));
|
||||
if (_start && newStart) memcpy(newStart, _start, _length);
|
||||
newStart[_length] = c;
|
||||
if (newStart) newStart[_length] = c;
|
||||
_start = newStart;
|
||||
}
|
||||
_length++;
|
||||
|
||||
Reference in New Issue
Block a user