diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-24 21:14:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-24 21:14:55 +0000 |
commit | ea301e15a65240aaf92c858d7df66169e6dce33d (patch) | |
tree | 5e6b88a11a41443eb940f9c1d2e50339da2dd106 /lib/Lex/PPLexerChange.cpp | |
parent | 4cc34cbe1c4983b6484701509699be22d5256138 (diff) |
Avoid overflowing buffer, patch by Algeris Kirtzidis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
-rw-r--r-- | lib/Lex/PPLexerChange.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp index bd0ff7f94a..c15675114d 100644 --- a/lib/Lex/PPLexerChange.cpp +++ b/lib/Lex/PPLexerChange.cpp @@ -86,7 +86,7 @@ Token Preprocessor::LookAhead(unsigned N) { // left, we can just grow it. This means we only have to do the new 1/16th as // often. - Token *LookaheadTokens = new Token[N]; + Token *LookaheadTokens = new Token[N+1]; // Read N+1 tokens into LookaheadTokens. After this loop, Tok is the token // to return. |