mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-10-15 10:29:51 +00:00
Added max recusrion depth for cJSONDuplicate to prevent stack exhaustion in case of circular reference
This commit is contained in:
1 parent
078c4e6c53
commit
9d1b229086
3 files changed
+35
-1
No files matched your search
@@ -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