Skip to content

Commit a247845

Browse files
committed
Fix #13712 fuzzing crash (stack overflow) in Token::typeDecl()
1 parent 1964001 commit a247845

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
@@ -8931,6 +8931,8 @@ void Tokenizer::findGarbageCode() const
89318931
syntaxError(tok->next());
89328932
if (Token::Match(tok, "%name% %op% %name%") && !tok->isKeyword() && tok->next()->isIncDecOp())
89338933
syntaxError(tok->next());
8934+
if (!tok->isKeyword() && Token::Match(tok, "%name% .|-> %name% %name%") && !tok->tokAt(2)->isKeyword())
8935+
syntaxError(tok);
89348936
if (Token::Match(tok, "[!|+-/%^~] )|]"))
89358937
syntaxError(tok);
89368938
if (Token::Match(tok, "==|!=|<=|>= %comp%") && tok->strAt(-1) != "operator")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
n f(){auto x=i->o x}

0 commit comments

Comments
 (0)