ccan
ccan copied to clipboard
Add and fix JSON stack overflow tests
Fixes #73
The JSON test suite (https://github.com/nst/JSONTestSuite/) contains a list of JSON test files, two of which which triggered crashes. n_structure_100000_opening_arrays.json n_structure_open_array_object.json
These crashes were both caused by excessive recursion as they created massively deep arrays and objects.
These test examples have been added to test-strings. Modifications were alse made to the test runners to support them.
An arbitrary depth cap has been added to the parser prevent the overflow problem.
Clang tests failing, looks like this error https://github.com/travis-ci/travis-ci/issues/8613