Skip to content

Commit f58f77d

Browse files
committed
PR change suggestions.
1 parent 13cf555 commit f58f77d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ VariableAccess commonException() {
5656
// Finally, exclude functions that contain assembly blocks. It's
5757
// anyone's guess what happens in those.
5858
containsInlineAssembly(result.getEnclosingFunction())
59+
or
60+
exists(Call c | c.getQualifier() = result | c.getTarget().isStatic())
5961
}
6062

6163
predicate isSinkImpl(Instruction sink, VariableAccess va) {
@@ -86,10 +88,5 @@ from
8688
where
8789
conf.hasFlowPath(source, sink) and
8890
isSinkImpl(sink.getInstruction(), va) and
89-
v = va.getTarget() and
90-
(
91-
exists(Call c | c.getQualifier() = va)
92-
implies
93-
exists(Call c | c.getQualifier() = va and not c.getTarget().isStatic())
94-
)
91+
v = va.getTarget()
9592
select va, "The variable $@ may not be initialized at this access.", v, v.getName()

0 commit comments

Comments
 (0)