From 4109848927a536b971c12f4aa417175fb632f3ea Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 4 Dec 2025 17:55:34 +0000 Subject: [PATCH] Rust: Clean up following merge. --- .../rust/security/AccessAfterLifetimeExtensions.qll | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll b/rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll index 4b356aaa651..dc99c61405b 100644 --- a/rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll @@ -99,16 +99,10 @@ module AccessAfterLifetime { // `b` is a child of `a` a = b.getEnclosingBlock*() or - // propagate through function calls (static target) + // propagate through function calls exists(Call call | mayEncloseOnStack(a, call.getEnclosingBlock()) and - call.getStaticTarget() = b.getEnclosingCallable() - ) - or - // propagate through function calls (runtime target) - exists(Call c | - mayEncloseOnStack(a, c.getEnclosingBlock()) and - c.getARuntimeTarget() = b.getEnclosingCallable() + [call.getStaticTarget(), call.getARuntimeTarget()] = b.getEnclosingCallable() ) }