Skip to content

Commit 0d3b334

Browse files
committed
Fix #14356 fuzzing crash (null-pointer-use) in ReverseTraversal::traverse()
1 parent a5ec929 commit 0d3b334

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
@@ -8936,6 +8936,8 @@ void Tokenizer::findGarbageCode() const
89368936
syntaxError(tok);
89378937
if (Token::Match(tok, "& %comp%|&&|%oror%|&|%or%") && tok->strAt(1) != ">")
89388938
syntaxError(tok);
8939+
if (Token::Match(tok, "%comp%|&&|%oror%|&|%or% }") && tok->str() != ">")
8940+
syntaxError(tok);
89398941
if (Token::Match(tok, "^ %op%") && !Token::Match(tok->next(), "[>*+-!~]"))
89408942
syntaxError(tok);
89418943
if (Token::Match(tok, ": [)]=]"))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
f(S=n){n*,n&&}

0 commit comments

Comments
 (0)