llvm-project
e6cef24f - [clang-format] Fix crash on numeric literals with an incomplete exponent (#206594)

Commit
4 days ago
[clang-format] Fix crash on numeric literals with an incomplete exponent (#206594) NumericLiteralInfo could read into tokens out of bounds due to the token processing assuming well-formed numeric literals and incrementing pointers to read past them. The fix properly bounds the searches to the token size via std::min and accounts for the new trimmed string size. Fixes #206593 Used Claude Code for help with identifying the source of the bug and checking correctness with fuzzing, wrote the solution myself
Author
Parents
Loading