SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/user/Desktop/serenity/Userland/Libraries/LibPDF/Parser.cpp:734:35 in
Hit this a few times while fuzzing:
/home/user/Desktop/serenity/Userland/Libraries/LibPDF/Parser.cpp:734:35: runtime error: 4.50794e+18 is outside the range of representable values of type 'int'
/home/user/Desktop/serenity/Userland/Libraries/LibPDF/Parser.cpp:734:35: runtime error: inf is outside the range of representable values of type 'int'
Parser::parse_number
will continue to consume()
so long as the next character is a digit. This can lead to parsing multiple digits which exceed maximum int
.
Parser::parse_number
contains logic to handle floats by flipping is_float
boolean to true
, but only if .
is present. If is_float
is false
, the returned value is cast as int
.
serenity/Userland/Libraries/LibPDF/Parser.cpp
Lines 705 to 735 in 1f894ce
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too