Skip to content

Commit ac48167

Browse files
authored
fixed fuzzing crash (cppcheck-opensource#6005)
1 parent 6ff9a72 commit ac48167

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/symboldatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5030,7 +5030,7 @@ static const Token* skipPointers(const Token* tok)
50305030
{
50315031
while (Token::Match(tok, "*|&|&&") || (Token::Match(tok, "( [*&]") && Token::Match(tok->link()->next(), "(|["))) {
50325032
tok = tok->next();
5033-
if (tok->strAt(-1) == "(" && Token::Match(tok, "%type% ::"))
5033+
if (tok && tok->strAt(-1) == "(" && Token::Match(tok, "%type% ::"))
50345034
tok = tok->tokAt(2);
50355035
}
50365036

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#i~clude <std*c = nt rerd*c = nt rern register
2+
n**************&******* register

0 commit comments

Comments
 (0)