Skip to content

Commit fdbde42

Browse files
Fix #12629 fuzzing timeout in valueFlowSymbolicOperators() (#6328)
1 parent fefe5f1 commit fdbde42

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

lib/symboldatabase.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,6 +2055,8 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
20552055

20562056
// template constructor?
20572057
else if (Token::Match(tok, "%name% <") && Token::simpleMatch(tok->next()->link(), "> (")) {
2058+
if (tok->isKeyword() || tok->isStandardType() || !outerScope->isClassOrStructOrUnion())
2059+
return false;
20582060
const Token* tok2 = tok->next()->link()->next()->link();
20592061
if (Token::Match(tok2, ") const| ;|{|=") ||
20602062
Token::Match(tok2, ") : ::| %name% (|::|<|{") ||
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e<>(){F+0+0+++++++++++++++++++++++++++++++++++++++++5;}

test/testgarbage.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,6 @@ class TestGarbage : public TestFixture {
907907

908908
void garbageCode109() { // #6900 "segmentation fault (invalid code) in CheckStl::runSimplifiedChecks"
909909
checkCode("( *const<> (( ) ) { } ( *const ( ) ( ) ) { } ( * const<> ( size_t )) ) { } ( * const ( ) ( ) ) { }");
910-
ignore_errout(); // we do not care about the output
911910
}
912911

913912
void garbageCode110() { // #6902 "segmentation fault (invalid code) in CheckStl::string_c_str"

0 commit comments

Comments
 (0)