Rust: Repair BadCtorInitialization.ql's StdCall using getCanonicalPath.

This commit is contained in:
Geoffrey White
2025-07-31 13:16:28 +01:00
parent 9d72fab287
commit 58680c94bc

View File

@@ -32,8 +32,7 @@ class CtorAttr extends Attr {
*/ */
class StdCall extends Expr { class StdCall extends Expr {
StdCall() { StdCall() {
this.(CallExpr).getFunction().(PathExpr).getResolvedCrateOrigin() = "lang:std" or this.(CallExprBase).getStaticTarget().getCanonicalPath().matches(["std::%", "<std::%"])
this.(MethodCallExpr).getResolvedCrateOrigin() = "lang:std"
} }
} }