Avoid overflowing buffer, patch by Algeris Kirtzidis!

llvm-svn: 48741
This commit is contained in:
Chris Lattner 2008-03-24 21:14:55 +00:00
parent 9c1f8b1d55
commit 22fc992f59
1 changed files with 1 additions and 1 deletions

View File

@ -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.