diff options
author | Volodymyr Sapsai <vsapsai@apple.com> | 2018-01-12 18:54:35 +0000 |
---|---|---|
committer | Volodymyr Sapsai <vsapsai@apple.com> | 2018-01-12 18:54:35 +0000 |
commit | 95cd7fb4765e803ec208b6289ca5d5a5bf5ca189 (patch) | |
tree | b43403fbe5a91a3a6dd736fe63c3c3e0018a6da8 /test/Lexer | |
parent | ad3d09ba075a882ebb9de4f094e223f321000a0d (diff) | |
download | clang-95cd7fb4765e803ec208b6289ca5d5a5bf5ca189.tar.gz |
[Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.
Fix makes the loop in LexAngledStringLiteral more like the loops in
LexStringLiteral, LexCharConstant. When we skip a character after
backslash, we need to check if we reached the end of the file instead of
reading the next character unconditionally.
Discovered by OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3832
rdar://problem/35572754
Reviewers: arphaman, kcc, rsmith, dexonsmith
Reviewed By: rsmith, dexonsmith
Subscribers: cfe-commits, rsmith, dexonsmith
Differential Revision: https://reviews.llvm.org/D41423
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Lexer')
-rw-r--r-- | test/Lexer/null-character-in-literal.c | bin | 0 -> 917 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/test/Lexer/null-character-in-literal.c b/test/Lexer/null-character-in-literal.c Binary files differnew file mode 100644 index 0000000000..a479547536 --- /dev/null +++ b/test/Lexer/null-character-in-literal.c |