Skip to content
Myr

Increase the maximum parsing depth for parsing JSON to 10000 (#3328)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This is the same limit as encoding/json in Go and should be sufficient for most use cases.

authored by itchyny · committed by GitHub · parent 9ac6dda · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/jv_parse.c+1 added-1 removed
9 unmodified lines
1011typedef const char* presult;1213#ifndef MAX_PARSING_DEPTH14#define MAX_PARSING_DEPTH (256)14#define MAX_PARSING_DEPTH (10000)15#endif1617#define TRY(x) do {presult msg__ = (x); if (msg__) return msg__; } while(0)18#ifdef __GNUC__
895 unmodified lines