summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorArun Raghavan <arun@arunraghavan.net>2016-06-01 17:18:36 +0530
committerArun Raghavan <arun@arunraghavan.net>2016-06-22 21:04:47 +0530
commit0c1dbf5c799272892da6f6a6f268b2207945f1f9 (patch)
tree7eb73dd27b3ad6ef6d7a4d7d94cfac672e5a5edf /src/tests
parent5b1bd849023bcbf495cdb91eef9552734efb9ca2 (diff)
json: Error out for objects and arrays that are nested too deep
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/json-test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/json-test.c b/src/tests/json-test.c
index ca92877c0..3f8ed92d5 100644
--- a/src/tests/json-test.c
+++ b/src/tests/json-test.c
@@ -227,6 +227,8 @@ START_TEST(bad_test) {
"1." /* Bad number string */,
"1.e3" /* Bad number string */,
"-" /* Bad number string */,
+ "{ \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { } } } } } } } } } } } } } } } } } } } } } }" /* Nested too deep */,
+ "[ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ { \"a\": \"b\" } ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ]" /* Nested too deep */,
};
for (i = 0; i < PA_ELEMENTSOF(bad_parse); i++) {