You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
json parser: add a configurable maximum nesting depth to the JSON parser #669
The JSON library currently accepts documents of arbitrary nesting depth.
Add a bounded nesting depth to the parser, with a sane default and the ability to configure it, so that documents exceeding the limit are rejected with a regular parse error instead of being accepted.
If not implemented there is a risk of stack exhaustion from untrusted input. Parsing itself is iterative, but traversal, comparison, cloning, serialization and destruction of the resulting tree are recursive. A deeply nested document is accepted at parse time and then crashes the process later, in unrelated code.
Acceptance Criteria (DoD)
The parser rejects documents whose nesting depth exceeds the configured limit, returning a normal parse error.
Activity