Skip to content

Commit 836b667

Browse files
committed
Address review comment
1 parent 2543754 commit 836b667

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ predicate sourceBlock(Source s, Variable target, BlockExpr be) {
5959
sourceValueScope(s, target, be.getEnclosingBlock*())
6060
}
6161

62-
predicate sinkBlock(Sink s, BlockExpr be) { be = s.asExpr().getEnclosingBlock() }
62+
predicate sinkBlock(Sink s, BlockExpr be) {
63+
AccessAfterLifetimeFlow::flow(_, s) and
64+
be = s.asExpr().getEnclosingBlock()
65+
}
6366

6467
private predicate tcStep(BlockExpr a, BlockExpr b) {
6568
// propagate through function calls

0 commit comments

Comments
 (0)