Skip to content

Commit 92b7624

Browse files
Fix #13689 fuzzing crash (invalid-bool-load) in CheckUninitVar::checkLoopBodyRecursive() (danmar#8114)
1 parent 04a8201 commit 92b7624

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/checkuninitvar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ const Token* CheckUninitVar::checkLoopBodyRecursive(const Token *start, const Va
965965
return nullptr;
966966
}
967967

968-
bool alwaysReturnsUnused;
968+
bool alwaysReturnsUnused = false;
969969
const Token *errorToken1 = checkLoopBodyRecursive(tok, var, alloc, membervar, bailout, alwaysReturnsUnused);
970970
tok = tok->link();
971971
if (Token::simpleMatch(tok, "} else {")) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
i(){s a;for(;;)y{for(;;);};}

0 commit comments

Comments
 (0)