Skip to content

Commit abaf3f3

Browse files
Fix #12799 fuzzing crash in Tokenizer::setVarIdPass2() (#6469)
1 parent deff1f9 commit abaf3f3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/tokenize.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8192,7 +8192,7 @@ void Tokenizer::validateC() const
81928192
syntaxErrorC(tok, "template<...");
81938193
if (Token::Match(tok, "%name% :: %name%"))
81948194
syntaxErrorC(tok, tok->str() + tok->strAt(1) + tok->strAt(2));
8195-
if (Token::Match(tok, "class|namespace %name% [:{]"))
8195+
if (Token::Match(tok, "class|namespace %name% :|::|{"))
81968196
syntaxErrorC(tok, tok->str() + tok->strAt(1) + tok->strAt(2));
81978197
}
81988198
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class r::_

0 commit comments

Comments
 (0)