C++: Remove flow into ReadSideEffect instructions in simpleInstructionLocalFlowStep

This commit is contained in:
Mathias Vorreiter Pedersen
2020-10-02 14:10:28 +02:00
parent aa707e9370
commit 8f4982d3f5
3 changed files with 58 additions and 27 deletions

View File

@@ -25,13 +25,10 @@ class TestAllocationConfig extends TaintTracking::Configuration {
sink.(DataFlow::ExprNode).getConvertedExpr() instanceof ReferenceDereferenceExpr
)
or
sink
.asInstruction()
.(ReadSideEffectInstruction)
.getPrimaryInstruction()
.(CallInstruction)
.getStaticCallTarget()
.hasName("sink")
exists(ReadSideEffectInstruction read |
read.getSideEffectOperand() = sink.asOperand() and
read.getPrimaryInstruction().(CallInstruction).getStaticCallTarget().hasName("sink")
)
}
override predicate isSanitizer(DataFlow::Node barrier) {