]> granicus.if.org Git - clang/commit
Fix buffer overflow in Lexer
authorKostya Serebryany <kcc@google.com>
Mon, 4 May 2015 22:30:29 +0000 (22:30 +0000)
committerKostya Serebryany <kcc@google.com>
Mon, 4 May 2015 22:30:29 +0000 (22:30 +0000)
commit4e2435bb71b393c20a9ef637894389b74c5a514c
tree51a527e84ee9b99c4d20379944d0da1162b77dda
parent382ebce34f8793ffc59e37b7e77d1b4f4364cac1
Fix buffer overflow in Lexer

Summary:
Fix PR22407, where the Lexer overflows the buffer when parsing
 #include<\
(end of file after slash)

Test Plan:
Added a test that will trigger in asan build.
This case is also covered by the clang-fuzzer bot.

Reviewers: rnk

Reviewed By: rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D9489

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