Skip to content

Commit 6e03de9

Browse files
Fix #13703 fuzzing crash (stack overflow) in findTokensSkipDeadCodeImpl() (danmar#7990)
1 parent 2c47ced commit 6e03de9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/tokenize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8855,7 +8855,7 @@ void Tokenizer::findGarbageCode() const
88558855
syntaxError(tok, code);
88568856
}
88578857
}
8858-
if (Token::Match(tok, "%num%|%bool%|%char%|%str% %num%|%bool%|%char%|%str%") && !Token::Match(tok, "%str% %str%"))
8858+
if (Token::Match(tok, "%num%|%bool%|%char%|%str% %num%|%bool%|%char%|%str%|::") && !Token::Match(tok, "%str% %str%"))
88598859
syntaxError(tok);
88608860
if (Token::Match(tok, "%num%|%bool%|%char%|%str% {|(")) {
88618861
if (tok->strAt(1) == "(")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v f(){B?1::s:t}

0 commit comments

Comments
 (0)