From a39a6ea648be655bc59fa2e43366209178e0b74a Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Tue, 7 Mar 2023 16:18:27 +0000 Subject: [PATCH] C++: Don't use indirect instructions for asUnitialized. --- cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index 0f89d9a1001..05c0ff61af9 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -938,6 +938,7 @@ class UninitializedNode extends Node { UninitializedNode() { exists(Ssa::Def def | + def.getIndirectionIndex() = 0 and def.getValue().asInstruction() instanceof UninitializedInstruction and Ssa::nodeToDefOrUse(this, def, _) and v = def.getSourceVariable().getBaseVariable().(Ssa::BaseIRVariable).getIRVariable().getAst()