forked from OSchip/llvm-project
Avoid overflowing buffer, patch by Algeris Kirtzidis!
llvm-svn: 48741
This commit is contained in:
parent
9c1f8b1d55
commit
22fc992f59
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue