From cb3474183333a13514222ec26ec48f0f149201a5 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:02:05 +0200 Subject: [PATCH 1/2] Update tokenize.cpp --- lib/tokenize.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; From d73eea7b9d3598472212f932fe657b2890a7eba0 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:02:56 +0200 Subject: [PATCH 2/2] Add files via upload --- .../fuzz-crash/crash-8e34edab2458422d12e1b796686205a80760dbcb | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/cli/fuzz-crash/crash-8e34edab2458422d12e1b796686205a80760dbcb 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