Skip to content

Commit

Permalink
Fix #12852 fuzzing crash in getEnumType() (#6537)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jun 19, 2024
1 parent 1c35930 commit 3af999b
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 @@ -8681,6 +8681,8 @@ void Tokenizer::findGarbageCode() const
syntaxError(tok);
if (Token::Match(tok, "%assign% [;)}]") && (!cpp || !Token::simpleMatch(tok->previous(), "operator")))
syntaxError(tok);
if (Token::Match(tok, "; %assign%"))
syntaxError(tok);
if (Token::Match(tok, "%cop%|=|,|[ %or%|%oror%|/|%"))
syntaxError(tok);
if (Token::Match(tok, "[;([{] %comp%|%oror%|%or%|%|/"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enum{C=e;=U};

0 comments on commit 3af999b

Please sign in to comment.