Skip to content

Commit

Permalink
Fix #12535 fuzzing timeout in findTokensSkipDeadCode() (#6163)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Mar 20, 2024
1 parent 7211458 commit a0b2814
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8635,6 +8635,8 @@ void Tokenizer::findGarbageCode() const
syntaxError(tok);
if (Token::Match(tok, "==|!=|<=|>= %comp%") && tok->strAt(-1) != "operator")
syntaxError(tok, tok->str() + " " + tok->strAt(1));
if (Token::simpleMatch(tok, ":: ::"))
syntaxError(tok);
}

// ternary operator without :
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
t i(){int
t,?:0::::}

0 comments on commit a0b2814

Please sign in to comment.