Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d3fc73

Browse files
committed
C++: Fix compilation issue in UseAfterFree.qll.
1 parent f52b6e0 commit 8d3fc73

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cpp/ql/lib/semmle/code/cpp/security/flowafterfree/UseAfterFree.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ private module ParameterSinks {
139139
}
140140

141141
private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplCommon
142+
private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate
142143

143144
/**
144145
* Holds if `n` represents the expression `e`, and `e` is a pointer that is
@@ -149,11 +150,11 @@ private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplCommon
149150
predicate isUse(DataFlow::Node n, Expr e) {
150151
isUse0(e) and n.asExpr() = e
151152
or
152-
exists(CallInstruction call, InitializeParameterInstruction init |
153+
exists(DataFlowCall call, InitializeParameterInstruction init |
153154
n.asOperand().getDef().getUnconvertedResultExpression() = e and
154155
pragma[only_bind_into](init) = ParameterSinks::getAnAlwaysDereferencedParameter() and
155156
viableParamArg(call, DataFlow::instructionNode(init), n) and
156157
pragma[only_bind_out](init.getEnclosingFunction()) =
157-
pragma[only_bind_out](call.getStaticCallTarget())
158+
pragma[only_bind_out](call.asCallInstruction().getStaticCallTarget())
158159
)
159160
}

0 commit comments

Comments
 (0)