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

prototext: error parsing "- " #1530

Closed
neild opened this issue Mar 13, 2023 · 2 comments
Closed

prototext: error parsing "- " #1530

neild opened this issue Mar 13, 2023 · 2 comments

Comments

@neild
Copy link
Contributor

neild commented Mar 13, 2023

The recent prototext change to support parsing numbers with whitespace between the minus sign and number (https://go.dev/cl/473015) has introduced a panic when parsing an incomplete number consisting of a -, whitespace, and no further input.

For example, parsing this panics:

s_int32: - # trailing space after -
@neild
Copy link
Contributor Author

neild commented Mar 13, 2023

Fuzzing found this in 260ms on my machine. Probably a good sign we should update internal/fuzz to work with Go 1.18 fuzzing and maybe add a brief run to test.bash.

@jhump
Copy link
Contributor

jhump commented Mar 16, 2023

Oof, that was subtle. Sorry about that. Thanks for addressing so quickly!

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

No branches or pull requests

2 participants