diff options
author | cvzi <cuzi@openmail.cc> | 2023-07-08 01:51:21 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-07-08 11:36:15 +0200 |
commit | f5eb7ea1a9a655ba2e1775341554bf239cfe65a8 (patch) | |
tree | a44c415c76ed625c8d9174932f98b0d81790bbc7 /test | |
parent | 2e7fcc5a2a04c53c740a66487a39d17eae854f41 (diff) | |
download | mpv-f5eb7ea1a9a655ba2e1775341554bf239cfe65a8.tar.bz2 mpv-f5eb7ea1a9a655ba2e1775341554bf239cfe65a8.tar.xz |
json: unify json_parse depth to MAX_JSON_DEPTH=50
Diffstat (limited to 'test')
-rw-r--r-- | test/json.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/json.c b/test/json.c index fb6633accf..8aeae2326e 100644 --- a/test/json.c +++ b/test/json.c @@ -63,8 +63,6 @@ static const struct entry entries[] = { NODE_MAP(L("_a12"), L(NODE_STR("b")))}, }; -#define MAX_DEPTH 10 - int main(void) { for (int n = 0; n < MP_ARRAY_SIZE(entries); n++) { @@ -73,7 +71,7 @@ int main(void) char *s = talloc_strdup(tmp, e->src); json_skip_whitespace(&s); struct mpv_node res; - bool ok = json_parse(tmp, &res, &s, MAX_DEPTH) >= 0; + bool ok = json_parse(tmp, &res, &s, MAX_JSON_DEPTH) >= 0; assert_true(ok != e->expect_fail); if (!ok) { talloc_free(tmp); |