Fix crashes detected with fuzzing
This commit is contained in:
parent
ce60b326f4
commit
c04557eb73
|
@ -8362,6 +8362,8 @@ const Token * Tokenizer::findGarbageCode() const
|
|||
return tok;
|
||||
if (Token::Match(tok, ";|(|[ %comp%"))
|
||||
return tok;
|
||||
if (Token::Match(tok, "%cop%|= ]") && tok->str() != "&")
|
||||
return tok;
|
||||
}
|
||||
|
||||
// Code must not start with an arithmetical operand
|
||||
|
|
|
@ -1205,6 +1205,7 @@ private:
|
|||
ASSERT_THROW(checkCode("void f() { x= name2 & name3 name2 = | 0.1 , | 0.1 , | 0.1 name4 <= >( ); }"), InternalError);
|
||||
ASSERT_THROW(checkCode("void f() { x = , * [ | + 0xff | > 0xff]; }"), InternalError);
|
||||
ASSERT_THROW(checkCode("void f() { x = , | 0xff , 0.1 < ; }"), InternalError);
|
||||
ASSERT_THROW(checkCode("void f() { x = [ 1 || ] ; }"), InternalError);
|
||||
}
|
||||
|
||||
void garbageValueFlow() {
|
||||
|
|
Loading…
Reference in New Issue