We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7402fe commit 4109848Copy full SHA for 4109848
rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll
@@ -99,16 +99,10 @@ module AccessAfterLifetime {
99
// `b` is a child of `a`
100
a = b.getEnclosingBlock*()
101
or
102
- // propagate through function calls (static target)
+ // propagate through function calls
103
exists(Call call |
104
mayEncloseOnStack(a, call.getEnclosingBlock()) and
105
- call.getStaticTarget() = b.getEnclosingCallable()
106
- )
107
- or
108
- // propagate through function calls (runtime target)
109
- exists(Call c |
110
- mayEncloseOnStack(a, c.getEnclosingBlock()) and
111
- c.getARuntimeTarget() = b.getEnclosingCallable()
+ [call.getStaticTarget(), call.getARuntimeTarget()] = b.getEnclosingCallable()
112
)
113
}
114
0 commit comments