We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 12113e9 + c8be67c commit 2abe416Copy full SHA for 2abe416
cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll
@@ -335,6 +335,12 @@ private Element adjustedSink(DataFlow::Node sink) {
335
// For compatibility, send flow into a `NotExpr` even if it's part of a
336
// short-circuiting condition and thus might get skipped.
337
result.(NotExpr).getOperand() = sink.asExpr()
338
+ or
339
+ // Taint postfix and prefix crement operations when their operand is tainted.
340
+ result.(CrementOperation).getAnOperand() = sink.asExpr()
341
342
+ // Taint `e1 += e2`, `e &= e2` and friends when `e1` or `e2` is tainted.
343
+ result.(AssignOperation).getAnOperand() = sink.asExpr()
344
}
345
346
predicate tainted(Expr source, Element tainted) {
0 commit comments