[Bug c/86137] ubsan runtime error in c-format.c
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 13 19:40:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86137
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Yes, this code needs to be fixed to avoid undefined overflow (if argnum >
INT_MAX / 10 || (argnum == INT_MAX / 10 && *fcp - '0' > INT_MAX % 10),
record that overflow has occurred and don't do the arithmetic on argnum).
More information about the Gcc-bugs
mailing list