]> granicus.if.org Git - clang/commit
[lex] Don't read past the end of the buffer
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 29 Mar 2015 14:11:37 +0000 (14:11 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 29 Mar 2015 14:11:37 +0000 (14:11 +0000)
commit8725a300002aa83c82bd44303f5a8bcf5856a9af
treee9c9c56acc08a226c5c7d5c0e676117df275134f
parent3dd6fa5d291d86c37615fc9f1f09ab28bd44c31b
[lex] Don't read past the end of the buffer

While dereferencing ThisTokEnd is fine and we know that it's not in
[a-zA-Z0-9_.], ThisTokEnd[1] is really past the end.

Found by asan and with a little help from clang-fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233491 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/LiteralSupport.cpp
test/Lexer/eof-number.c [new file with mode: 0644]