Skip to content

Commit 1dd5926

Browse files
committed
C++: Generalize new case in adjustedSink to all AssignOperations
1 parent bcd84ef commit 1dd5926

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ private Element adjustedSink(DataFlow::Node sink) {
339339
// Taint `e--` and `e++` when `e` is tainted.
340340
result.(PostfixCrementOperation).getAnOperand() = sink.asExpr()
341341
or
342-
// Taint `e1 += e2` when `e1` or `e2` is tainted.
343-
result.(AssignArithmeticOperation).getAnOperand() = sink.asExpr()
342+
// Taint `e1 += e2`, `e &= e2` and friends when `e1` or `e2` is tainted.
343+
result.(AssignOperation).getAnOperand() = sink.asExpr()
344344
}
345345

346346
predicate tainted(Expr source, Element tainted) {

0 commit comments

Comments
 (0)