Skip to content

Commit bd5ff18

Browse files
Fix #14451 fuzzing crash (stack-overflow) in CheckNullPointer::nullPointerByDeRefAndCheck() (danmar#8199)
1 parent 7c5db88 commit bd5ff18

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/tokenize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8987,6 +8987,8 @@ void Tokenizer::findGarbageCode() const
89878987
if (!Token::Match(tok->next(), "%name%|*|~"))
89888988
syntaxError(tok, tok->strAt(-1) + " " + tok->str() + " " + tok->strAt(1));
89898989
}
8990+
if (Token::Match(tok, ".|-> .|->"))
8991+
syntaxError(tok);
89908992
if (Token::Match(tok, "[{,] . %name%") && !Token::Match(tok->tokAt(3), "[.=[{]"))
89918993
syntaxError(tok->next());
89928994
if (Token::Match(tok, "%name% %op% %name%") && !tok->isKeyword() && tok->next()->isIncDecOp())
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v(){p?1:p..}

0 commit comments

Comments
 (0)