Commit 1ab2205a authored by David Gibson's avatar David Gibson
Browse files

Gracefully handle bad octal literals



The code handling integer literals in dtc-lexer.l assumes that the flex
regexp means that strtoull() can't fail to interpret the string as a valid
integer (either decimal, octal, or hexadecimal).  This is not true for
octals.  For example '09' is accepted as a literal by the regexp,
strtoull() attempts to handle it as octal, but it has a bad digit.

This changes the code to give a more useful error in this case.

Reported-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 19370955
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment