Skip to content

Commit

Permalink
Fix #12631 fuzzing timeout in Tokenizer::simplifyTypedefCpp() (#6312)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Apr 21, 2024
1 parent ebf4cc2 commit ba9216e
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@ -8667,6 +8667,8 @@ void Tokenizer::findGarbageCode() const
if (Token::Match(tok->next(), ")|]|>|%assign%|%or%|%oror%|==|!=|/|>=|<=|&&"))
syntaxError(tok);
}
if ((!isCPP() || !Token::simpleMatch(tok->previous(), "operator")) && Token::Match(tok, "[,;] ,"))
syntaxError(tok);
if (Token::simpleMatch(tok, ".") &&
!Token::simpleMatch(tok->previous(), ".") &&
!Token::simpleMatch(tok->next(), ".") &&
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ama typedef f m ef ef dz e dz e e ef ef m ef dz e,,,,m ef dz e,,,,,K

0 comments on commit ba9216e

Please sign in to comment.