Skip to content

Commit 79cedc2

Browse files
committed
Rust: Rename predicate again.
1 parent 5bf799e commit 79cedc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module AccessAfterLifetime {
4949
exists(BlockExpr valueScope, BlockExpr accessScope |
5050
valueScope(source.getTarget(), target, valueScope) and
5151
accessScope = sink.asExpr().getExpr().getEnclosingBlock() and
52-
not maybeOnStack(valueScope, accessScope)
52+
not mayEncloseOnStack(valueScope, accessScope)
5353
)
5454
}
5555

@@ -87,13 +87,13 @@ module AccessAfterLifetime {
8787
* (for example if `f` and `g` both call `b`, then then depending on the
8888
* caller a variable in `f` or `g` may or may-not be on the stack during `b`).
8989
*/
90-
private predicate blockStackEnclosing(BlockExpr a, BlockExpr b) {
90+
private predicate mayEncloseOnStack(BlockExpr a, BlockExpr b) {
9191
// `b` is a child of `a`
9292
a = b.getEnclosingBlock*()
9393
or
9494
// propagate through function calls
9595
exists(CallExprBase ce |
96-
maybeOnStack(a, ce.getEnclosingBlock()) and
96+
mayEncloseOnStack(a, ce.getEnclosingBlock()) and
9797
ce.getStaticTarget() = b.getEnclosingCallable()
9898
)
9999
}

0 commit comments

Comments
 (0)