Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit depth of nesting by default #287

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Conversation

perlpunk
Copy link
Member

@perlpunk perlpunk commented Apr 1, 2024

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:

  • --max-level: you can now try out this feature on the command line
  • --show-error: By default, run-parser doesn't show errors. The new option helps with debugging

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

@perlpunk perlpunk requested a review from ingydotnet April 2, 2024 17:58
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:
* --max-level: you can now try out this feature on the command line
* --show-error: By default, run-parser doesn't show errors. The new option
  helps with debugging
@perlpunk perlpunk merged commit 51843fe into yaml:master Apr 8, 2024
4 checks passed
@perlpunk perlpunk deleted the max-level branch April 8, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants