We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 927d724 commit 7bbe39eCopy full SHA for 7bbe39e
python/ql/src/Variables/UninitializedLocal.ql
@@ -12,7 +12,7 @@
12
13
import python
14
import Undefined
15
-
+import semmle.python.pointsto.PointsTo
16
17
predicate uninitialized_local(NameNode use) {
18
exists(FastLocalVariable local |
@@ -21,7 +21,7 @@ predicate uninitialized_local(NameNode use) {
21
)
22
and
23
(
24
- any(Uninitialized uninit).taints(use)
+ any(Uninitialized uninit).taints(use) and PointsToInternal::reachableBlock(use.getBasicBlock(), _)
25
or
26
not exists(EssaVariable var | var.getASourceUse() = use)
27
0 commit comments