forked from bblanchon/ArduinoJson
Added a nesting limit to the parser to prevent stack overflow that could be a security issue
This commit is contained in:
@ -26,12 +26,12 @@ JsonObject &JsonBuffer::createObject() {
|
||||
return JsonObject::invalid();
|
||||
}
|
||||
|
||||
JsonArray &JsonBuffer::parseArray(char *json) {
|
||||
JsonParser parser(this, json);
|
||||
JsonArray &JsonBuffer::parseArray(char *json, uint8_t nestingLimit) {
|
||||
JsonParser parser(this, json, nestingLimit);
|
||||
return parser.parseArray();
|
||||
}
|
||||
|
||||
JsonObject &JsonBuffer::parseObject(char *json) {
|
||||
JsonParser parser(this, json);
|
||||
JsonObject &JsonBuffer::parseObject(char *json, uint8_t nestingLimit) {
|
||||
JsonParser parser(this, json, nestingLimit);
|
||||
return parser.parseObject();
|
||||
}
|
||||
|
Reference in New Issue
Block a user