Fixed #6659 (heap user after free: kernel: sm750_accel.c)
This commit is contained in:
parent
4ceed51bfb
commit
9bea7bec92
|
@ -2158,7 +2158,9 @@ static Token *skipTernaryOp(Token *tok)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Token::Match(tok->next(), "[{};]"))
|
if (tok->link() && Token::Match(tok, "[(<]"))
|
||||||
|
tok = tok->link();
|
||||||
|
else if (Token::Match(tok->next(), "[{};)]"))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (colonlevel) // Ticket #5214: Make sure the ':' matches the proper '?'
|
if (colonlevel) // Ticket #5214: Make sure the ':' matches the proper '?'
|
||||||
|
|
|
@ -209,7 +209,7 @@ private:
|
||||||
|
|
||||||
ASSERT_THROW(checkCode("void f() {switch (n) { case 0?1;:{2} : z(); break;}}"), InternalError);
|
ASSERT_THROW(checkCode("void f() {switch (n) { case 0?1;:{2} : z(); break;}}"), InternalError);
|
||||||
|
|
||||||
ASSERT_THROW(checkCode("void f() {switch (n) { case 0?(1?{3:4}):2 : z(); break;}}"), InternalError);
|
checkCode("void f() {switch (n) { case 0?(1?{3:4}):2 : z(); break;}}");
|
||||||
|
|
||||||
//ticket #4234
|
//ticket #4234
|
||||||
ASSERT_THROW(checkCode("( ) { switch break ; { switch ( x ) { case } y break ; : } }"), InternalError);
|
ASSERT_THROW(checkCode("( ) { switch break ; { switch ( x ) { case } y break ; : } }"), InternalError);
|
||||||
|
|
Loading…
Reference in New Issue