Skip to content

Commit cc571b3

Browse files
committed
Rust/AccessAfterLifetime
1 parent c9ece38 commit cc571b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/ql/src/queries/security/CWE-825/AccessAfterLifetime.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ module AccessAfterLifetimeConfig implements DataFlow::ConfigSig {
3232
predicate observeDiffInformedIncrementalMode() { any() }
3333

3434
Location getASelectedSourceLocation(DataFlow::Node source) {
35-
exists(Variable target, DataFlow::Node sink | result = target.getLocation() |
35+
exists(Variable target, DataFlow::Node sink |
36+
result = [target.getLocation(), source.getLocation()]
37+
|
3638
isSink(sink) and
3739
narrowDereferenceAfterLifetime(source, sink, target)
3840
)

0 commit comments

Comments
 (0)