diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 9d719cfaafa..6aa923a3667 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8635,6 +8635,8 @@ void Tokenizer::findGarbageCode() const syntaxError(tok); if (Token::Match(tok, "==|!=|<=|>= %comp%") && tok->strAt(-1) != "operator") syntaxError(tok, tok->str() + " " + tok->strAt(1)); + if (Token::simpleMatch(tok, ":: ::")) + syntaxError(tok); } // ternary operator without : diff --git a/test/cli/fuzz-timeout/timeout-a0b9848dd6e98677a0a96c5fc50ad571ed5a7092 b/test/cli/fuzz-timeout/timeout-a0b9848dd6e98677a0a96c5fc50ad571ed5a7092 new file mode 100644 index 00000000000..2f29da2e360 --- /dev/null +++ b/test/cli/fuzz-timeout/timeout-a0b9848dd6e98677a0a96c5fc50ad571ed5a7092 @@ -0,0 +1,2 @@ +t i(){int +t,?:0::::} \ No newline at end of file