yaml / libyaml

Canonical source repository for LibYAML
http://pyyaml.org/wiki/LibYAML
MIT License
921 stars 312 forks source link

Limit depth of nesting by default #287

Closed perlpunk closed 3 months ago

perlpunk commented 3 months ago

Each nesting level increases the stack and the number of previous starting events that the parser has to check.

The default maximum is 1000 and can be set via yaml_set_max_nest_level()

I also added new options to run-parser and run-parser-test-suite:

Note: This is done via a global variable in order to not break existing bindings.