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

Skip to content

Commit 66164eb

Browse files
pavgustjbj
authored andcommitted
Propagate data flow through NewExprs
1 parent 6236522 commit 66164eb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ private predicate exprToExprStep_nocfg(Expr fromExpr, Expr toExpr) {
376376
or
377377
toExpr = any(StmtExpr stmtExpr | fromExpr = stmtExpr.getResultExpr())
378378
or
379+
toExpr.(NewExpr).getInitializer() = fromExpr
380+
or
379381
toExpr = any(Call call |
380382
exists(DataFlowFunction f, FunctionInput inModel, FunctionOutput outModel, int iIn |
381383
call.getTarget() = f and

0 commit comments

Comments
 (0)