Skip to content

Commit 4109848

Browse files
committed
Rust: Clean up following merge.
1 parent b7402fe commit 4109848

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,10 @@ module AccessAfterLifetime {
9999
// `b` is a child of `a`
100100
a = b.getEnclosingBlock*()
101101
or
102-
// propagate through function calls (static target)
102+
// propagate through function calls
103103
exists(Call call |
104104
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()
105+
[call.getStaticTarget(), call.getARuntimeTarget()] = b.getEnclosingCallable()
112106
)
113107
}
114108

0 commit comments

Comments
 (0)