diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index a14b78e7015..ab8a6fe080f 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -5030,7 +5030,7 @@ static const Token* skipPointers(const Token* tok) { while (Token::Match(tok, "*|&|&&") || (Token::Match(tok, "( [*&]") && Token::Match(tok->link()->next(), "(|["))) { tok = tok->next(); - if (tok->strAt(-1) == "(" && Token::Match(tok, "%type% ::")) + if (tok && tok->strAt(-1) == "(" && Token::Match(tok, "%type% ::")) tok = tok->tokAt(2); } diff --git a/test/cli/fuzz-crash/crash-8a24e81ac1d7627233a227e6cc156dd20d57b058 b/test/cli/fuzz-crash/crash-8a24e81ac1d7627233a227e6cc156dd20d57b058 new file mode 100644 index 00000000000..cfb3a566403 --- /dev/null +++ b/test/cli/fuzz-crash/crash-8a24e81ac1d7627233a227e6cc156dd20d57b058 @@ -0,0 +1,2 @@ +#i~clude