Skip to content

Commit c4fe8df

Browse files
committed
C++: Support data flow from parameter deref to return value.
1 parent 4563e32 commit c4fe8df

File tree

2 files changed

+230
-221
lines changed

2 files changed

+230
-221
lines changed

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,11 @@ private predicate exprToExprStep_nocfg(Expr fromExpr, Expr toExpr) {
677677
exists(DataFlowFunction f, FunctionInput inModel, FunctionOutput outModel |
678678
f.hasDataFlow(inModel, outModel) and
679679
(
680+
exists(int iIn |
681+
inModel.isParameterDeref(iIn) and
682+
call.passesByReference(iIn, fromExpr)
683+
)
684+
or
680685
exists(int iIn |
681686
inModel.isParameter(iIn) and
682687
fromExpr = call.getArgument(iIn)

0 commit comments

Comments
 (0)