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

fix: possible infinite loop when parsing option #1923

Merged
merged 1 commit into from Aug 21, 2023

Conversation

alexander-fenster
Copy link
Contributor

@alexander-fenster alexander-fenster commented Aug 17, 2023

The while loop in parseOptionValue can be infinite if the closing brace } it expects never comes.

const protobuf = require('protobufjs');
protobuf.parse("option (foo).whatever = {");

Reported by @oetr.

Minor unrelated changes also in this PR, because I'm too lazy to create a separate one:

  • changed eslint-disable-line to a proper eslint-disable-next-line in a few places to fix linting errors;
  • removed extra logging in one of the tests.

@alexander-fenster alexander-fenster merged commit f2a8620 into master Aug 21, 2023
12 checks passed
@github-actions github-actions bot mentioned this pull request Aug 21, 2023
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.

None yet

2 participants