diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index e20ca901f7d..6720ff8fd9c 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1528,6 +1528,11 @@ void Tokenizer::simplifyTypedefCpp() argEnd = tokOffset->linkAt(1); if (!argEnd) syntaxError(argStart); + const Token* tok2 = argEnd->next(); + while (tok2 && (tok2->isKeyword() || tok2->str() == ")")) + tok2 = tok2->next(); + if (!Token::simpleMatch(tok2, ";")) + syntaxError(tok2); tok = argEnd->next(); Token *spec = tok; diff --git a/test/cli/fuzz-crash/crash-8e34edab2458422d12e1b796686205a80760dbcb b/test/cli/fuzz-crash/crash-8e34edab2458422d12e1b796686205a80760dbcb new file mode 100644 index 00000000000..581bcb4dae7 --- /dev/null +++ b/test/cli/fuzz-crash/crash-8e34edab2458422d12e1b796686205a80760dbcb @@ -0,0 +1 @@ +typedef e*(C)()const C; \ No newline at end of file