mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-06-06 05:14:39 +00:00
Added max recusrion depth for cJSONDuplicate to prevent stack exhaustion in case of circular reference
This commit is contained in:
committed by
Alan Wang
parent
078c4e6c53
commit
9d1b229086
@@ -137,6 +137,12 @@ typedef int cJSON_bool;
|
||||
#define CJSON_NESTING_LIMIT 1000
|
||||
#endif
|
||||
|
||||
/* Limits the length of circular references can be before cJSON rejects to parse them.
|
||||
* This is to prevent stack overflows. */
|
||||
#ifndef CJSON_CIRCULAR_LIMIT
|
||||
#define CJSON_CIRCULAR_LIMIT 10000
|
||||
#endif
|
||||
|
||||
/* returns the version of cJSON as a string */
|
||||
CJSON_PUBLIC(const char*) cJSON_Version(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user