File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
rust/ql/lib/codeql/rust/security Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ module AccessAfterLifetime {
49
49
exists ( BlockExpr valueScope , BlockExpr accessScope |
50
50
valueScope ( source .getTarget ( ) , target , valueScope ) and
51
51
accessScope = sink .asExpr ( ) .getExpr ( ) .getEnclosingBlock ( ) and
52
- not maybeOnStack ( valueScope , accessScope )
52
+ not mayEncloseOnStack ( valueScope , accessScope )
53
53
)
54
54
}
55
55
@@ -87,13 +87,13 @@ module AccessAfterLifetime {
87
87
* (for example if `f` and `g` both call `b`, then then depending on the
88
88
* caller a variable in `f` or `g` may or may-not be on the stack during `b`).
89
89
*/
90
- private predicate blockStackEnclosing ( BlockExpr a , BlockExpr b ) {
90
+ private predicate mayEncloseOnStack ( BlockExpr a , BlockExpr b ) {
91
91
// `b` is a child of `a`
92
92
a = b .getEnclosingBlock * ( )
93
93
or
94
94
// propagate through function calls
95
95
exists ( CallExprBase ce |
96
- maybeOnStack ( a , ce .getEnclosingBlock ( ) ) and
96
+ mayEncloseOnStack ( a , ce .getEnclosingBlock ( ) ) and
97
97
ce .getStaticTarget ( ) = b .getEnclosingCallable ( )
98
98
)
99
99
}
You can’t perform that action at this time.
0 commit comments