Skip to content
Snippets Groups Projects
Commit 24ca226e authored by Christopher Tam's avatar Christopher Tam Committed by CQ bot account: commit-bot@chromium.org
Browse files

[fidlc] Fix uint64 negative parsing

ParseNumericLiteral() uses strtoull() to parse unsigned numeric types.
strtoull() parses negative numbers with unsigned integer wraparound
rules instead of failing. For all <64-bit unsigned types, this still
failed properly, since the wraparound would overrun the upper limit of
the type, but for uint64, this would incorrectly succeed. This change
addresses this error case.

Test: Run new test cases.
Change-Id: I4b419865bcb3059a362685ee1ac8229ee8034844
parent 1a12554d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment