C++: Add += and friends to adjustedSink

This commit is contained in:
Mathias Vorreiter Pedersen
2020-02-10 15:50:52 +01:00
parent 99a9d7f676
commit bcd84efe8d

View File

@@ -338,6 +338,9 @@ private Element adjustedSink(DataFlow::Node sink) {
or
// Taint `e--` and `e++` when `e` is tainted.
result.(PostfixCrementOperation).getAnOperand() = sink.asExpr()
or
// Taint `e1 += e2` when `e1` or `e2` is tainted.
result.(AssignArithmeticOperation).getAnOperand() = sink.asExpr()
}
predicate tainted(Expr source, Element tainted) {