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

protoparse: double/float constants that are larger than int64 range cause error #312

Closed
jhump opened this issue Apr 26, 2020 · 1 comment

Comments

@jhump
Copy link
Owner

jhump commented Apr 26, 2020

If a numeric literal, such as used to define the value for a double or float option, uses neither a dot nor scientific notation, then it will cause a parse error if it exceeds the range of a uint64. If a negative literal is used, the error happens if it exceeds the range of an int64.

These are two minimal reproducers:

// positive literal
message Foo { optional double bar = 1 [default = 18446744073709551616]; }
// negative literal
message Foo { optional double bar = 1 [default = -18446744073709551615]; }
@jhump
Copy link
Owner Author

jhump commented Apr 27, 2020

Fixed in #316

@jhump jhump closed this as completed Apr 27, 2020
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

1 participant