Rust/AccessAfterLifetime

This commit is contained in:
Nora Dimitrijević
2025-10-15 14:54:05 +02:00
parent 0f0bd0f455
commit 4952cb27fb

View File

@@ -32,7 +32,9 @@ module AccessAfterLifetimeConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }
Location getASelectedSourceLocation(DataFlow::Node source) {
exists(Variable target, DataFlow::Node sink | result = target.getLocation() |
exists(Variable target, DataFlow::Node sink |
result = [target.getLocation(), source.getLocation()]
|
isSink(sink) and
narrowDereferenceAfterLifetime(source, sink, target)
)