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:
@@ -43,3 +43,9 @@ TEST_F(DynamicJsonBuffer_NoMemory_Tests, ParseObject) {
|
||||
char json[] = "{}";
|
||||
ASSERT_FALSE(_jsonBuffer.parseObject(json).success());
|
||||
}
|
||||
|
||||
TEST_F(DynamicJsonBuffer_NoMemory_Tests, String) {
|
||||
DynamicJsonBufferBase<NoMemoryAllocator>::String str = _jsonBuffer.startString();
|
||||
str.append('!');
|
||||
ASSERT_EQ(NULL, str.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user