Skip to content

Commit 73ee740

Browse files
authored
Merge pull request #6342 from MathiasVP/fix-fp-in-uninitialized-local
C++: Fix FP in `cpp/uninitialized-local`
2 parents 22f6b02 + e536cec commit 73ee740

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ DeclStmt declWithNoInit(LocalVariable v) {
4141
result.getADeclaration() = v and
4242
not exists(v.getInitializer()) and
4343
/* The type of the variable is not stack-allocated. */
44-
not allocatedType(v.getType())
44+
exists(Type t | t = v.getType() | not allocatedType(t))
4545
}
4646

4747
class UninitialisedLocalReachability extends StackVariableReachability {

0 commit comments

Comments
 (0)