Skip to content

Commit 46cc3b9

Browse files
committed
Fix #13694 fuzzing crash (null-pointer-use) in isUnreachableOperand()
1 parent 0d3b334 commit 46cc3b9

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

lib/tokenize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8944,6 +8944,8 @@ void Tokenizer::findGarbageCode() const
89448944
syntaxError(tok);
89458945
if (Token::Match(tok, "typedef [,;:]"))
89468946
syntaxError(tok);
8947+
if (Token::Match(tok, "? %assign%"))
8948+
syntaxError(tok);
89478949
if (Token::Match(tok, "!|~ %comp%") &&
89488950
!(cpp && tok->strAt(1) == ">" && Token::simpleMatch(tok->tokAt(-1), "operator")))
89498951
syntaxError(tok);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(c[?=3:4])p

0 commit comments

Comments
 (0)