Skip to content

Commit a0a31d9

Browse files
Fix #14741 fuzzing crash (null-pointer-use) in SymbolicConditionHandler::parse() (#8722)
1 parent 5aa31d0 commit a0a31d9

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/tokenlist.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,9 +2032,9 @@ void TokenList::validateAst(bool print) const
20322032
"' doesn't have two operands.",
20332033
InternalError::AST);
20342034
}
2035-
if (tok->str() == "case" && !tok->astOperand1()) {
2035+
if (!tok->astOperand1() && Token::Match(tok, "case|!")) {
20362036
throw InternalError(tok,
2037-
"Syntax Error: AST broken, 'case' doesn't have an operand.",
2037+
"Syntax Error: AST broken, '" + tok->str() + "' doesn't have an operand.",
20382038
InternalError::AST);
20392039
}
20402040

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
i(){!!:!=!&&d}

0 commit comments

Comments
 (0)