Skip to content

Commit 0a43e46

Browse files
Fix #14436 fuzzing crash (null-pointer-use) in getEnumType() (#8711)
1 parent cad91da commit 0a43e46

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

lib/tokenlist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2005,7 +2005,7 @@ void TokenList::validateAst(bool print) const
20052005
if (Token::simpleMatch(tok->previous(), "operator"))
20062006
continue;
20072007
// Skip incomplete code
2008-
if (!tok->astOperand1() && !tok->astOperand2() && !tok->astParent())
2008+
if (!tok->astOperand1() && !tok->astOperand2() && !tok->astParent() && !(tok->str().size() == 2 && tok->str()[1] == '='))
20092009
continue;
20102010
// Skip lambda assignment and/or initializer
20112011
if (Token::Match(tok, "= {|^|["))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enum{A=s(u)0&=s};

0 commit comments

Comments
 (0)