Skip to content

Commit 7b09e41

Browse files
committed
C++: Add localExprTaint for IR
This is for ODASA-8053.
1 parent 80a0027 commit 7b09e41

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ private predicate localInstructionTaintStep(Instruction nodeFrom, Instruction no
5656
*/
5757
predicate localTaint(DataFlow::Node source, DataFlow::Node sink) { localTaintStep*(source, sink) }
5858

59+
/**
60+
* Holds if taint can flow from `e1` to `e2` in zero or more
61+
* local (intra-procedural) steps.
62+
*/
63+
predicate localExprTaint(Expr e1, Expr e2) {
64+
localTaint(DataFlow::exprNode(e1), DataFlow::exprNode(e2))
65+
}
66+
5967
/**
6068
* Holds if the additional step from `src` to `sink` should be included in all
6169
* global taint flow configurations.

0 commit comments

Comments
 (0)