llvm-project/clang/lib/Lex
Kostya Serebryany 6c2479bee4 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

llvm-svn: 236466
2015-05-04 22:30:29 +00:00
..
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
HeaderMap.cpp Make VFS and FileManager match the current MemoryBuffer API. 2014-10-26 22:44:13 +00:00
HeaderSearch.cpp [modules] Stop trying to fake up a linear MacroDirective history. 2015-04-29 23:20:19 +00:00
Lexer.cpp Fix buffer overflow in Lexer 2015-05-04 22:30:29 +00:00
LiteralSupport.cpp [lex] Don't read past the end of the buffer 2015-03-29 14:11:37 +00:00
MacroArgs.cpp [modules] Stop trying to fake up a linear MacroDirective history. 2015-04-29 23:20:19 +00:00
MacroInfo.cpp [modules] Add a mechanism to dump information about a macro. 2015-04-30 23:10:40 +00:00
Makefile
ModuleMap.cpp [modules] Start moving the module visibility information off the Module itself. 2015-05-01 01:53:09 +00:00
PPCaching.cpp Fix the build break introduced by r195799 by restoring two close 2013-11-27 01:40:12 +00:00
PPCallbacks.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
PPConditionalDirectiveRecord.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPDirectives.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPExpressions.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPLexerChange.cpp [modules] Don't bother creating a ModuleMacro representing a #undef that overrides nothing. 2015-05-02 01:14:40 +00:00
PPMacroExpansion.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PTHLexer.cpp unique_ptrify PTHManager's PerIDCache using the newly added llvm::FreeDeleter 2014-08-29 22:04:45 +00:00
Pragma.cpp [modules] Add a mechanism to dump information about a macro. 2015-04-30 23:10:40 +00:00
PreprocessingRecord.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
Preprocessor.cpp [modules] Remove dead code from Module for tracking macro import locations. 2015-05-02 02:08:26 +00:00
PreprocessorLexer.cpp Make Preprocessor::Lex non-recursive. 2013-09-19 00:41:32 +00:00
ScratchBuffer.cpp MSan told me that we actually dump the entire scratch buffer into PCH files, initialize it. 2015-04-06 20:01:49 +00:00
TokenConcatenation.cpp [c++1z] Support for u8 character literals. 2014-11-08 06:08:42 +00:00
TokenLexer.cpp [MSVC] Mimic MSVC whitespace collapse for incompatible token pasting 2015-04-17 12:43:57 +00:00
UnicodeCharSets.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00