Skip to content

Commit bcd84ef

Browse files
committed
C++: Add += and friends to adjustedSink
1 parent 99a9d7f commit bcd84ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ private Element adjustedSink(DataFlow::Node sink) {
338338
or
339339
// Taint `e--` and `e++` when `e` is tainted.
340340
result.(PostfixCrementOperation).getAnOperand() = sink.asExpr()
341+
or
342+
// Taint `e1 += e2` when `e1` or `e2` is tainted.
343+
result.(AssignArithmeticOperation).getAnOperand() = sink.asExpr()
341344
}
342345

343346
predicate tainted(Expr source, Element tainted) {

0 commit comments

Comments
 (0)