File tree Expand file tree Collapse file tree
src/semmle/code/cpp/ir/dataflow
test/library-tests/dataflow/DefaultTaintTracking Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,7 +222,6 @@ private predicate nodeIsBarrierIn(DataFlow::Node node) {
222222 not predictableInstruction ( iTo .getRight ( ) ) and
223223 // propagate taint from either the pointer or the offset, regardless of predictability
224224 not iTo instanceof PointerArithmeticInstruction
225-
226225 )
227226 or
228227 // don't use dataflow through calls to pure functions if two or more operands
@@ -473,7 +472,14 @@ private Element adjustedSink(DataFlow::Node sink) {
473472 // Taint `e1 += e2`, `e &= e2` and friends when `e1` or `e2` is tainted.
474473 result .( AssignOperation ) .getAnOperand ( ) = sink .asExpr ( )
475474 or
476- result = sink .asOperand ( ) .( SideEffectOperand ) .getUse ( ) .( ReadSideEffectInstruction ) .getArgumentDef ( ) .getUnconvertedResultExpression ( )
475+ result =
476+ sink
477+ .asOperand ( )
478+ .( SideEffectOperand )
479+ .getUse ( )
480+ .( ReadSideEffectInstruction )
481+ .getArgumentDef ( )
482+ .getUnconvertedResultExpression ( )
477483}
478484
479485/**
Original file line number Diff line number Diff line change 11import semmle.code.cpp.ir.dataflow.DefaultTaintTracking
22
33class SourceConfiguration extends TaintedWithPath:: TaintTrackingConfiguration {
4- override predicate isSink ( Element e ) {
5- any ( )
6- }
4+ override predicate isSink ( Element e ) { any ( ) }
75}
86
97from Expr source , Element tainted
You can’t perform that action at this time.
0 commit comments