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 {
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 }
You can’t perform that action at this time.
0 commit comments