This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
jdk-build-libs
/
json-c
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
11
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
Issue
#881
: don't allow json_tokener_new_ex() with a depth < 1
pull/884/head
Eric Hawicz
10 months ago
parent
565f181f65
commit
ff8ed0f094
2 changed files
with
4 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
json_tokener.c
+1
-0
json_tokener.h
+ 3
- 0
json_tokener.c
View File
@@ -154,6 +154,9 @@ struct json_tokener *json_tokener_new_ex(int depth)
{
struct json_tokener *tok;
if (depth < 1)
return NULL;
tok = (struct json_tokener *)calloc(1, sizeof(struct json_tokener));
if (!tok)
return NULL;
+ 1
- 0
json_tokener.h
View File
@@ -206,6 +206,7 @@ JSON_EXPORT struct json_tokener *json_tokener_new(void);
/**
* Allocate a new json_tokener with a custom max nesting depth.
* The depth must be at least 1.
* @see JSON_TOKENER_DEFAULT_DEPTH
*/
JSON_EXPORT struct json_tokener *json_tokener_new_ex(int depth);
Write
Preview
Loading…
Cancel
Save