Skip to content

Commit e7576fd

Browse files
authored
Merge pull request #11197 from jketema/simplify-taint-test
C++: Simplify dataflow taint test query
2 parents 06f6198 + 4d7aece commit e7576fd

File tree

1 file changed

+1
-10
lines changed
  • cpp/ql/test/library-tests/dataflow/taint-tests

1 file changed

+1
-10
lines changed

cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,7 @@ module IRTest {
9595
override predicate isSink(DataFlow::Node sink) {
9696
exists(FunctionCall call |
9797
call.getTarget().getName() = "sink" and
98-
sink.asConvertedExpr() = call.getAnArgument()
99-
or
100-
call.getTarget().getName() = "sink" and
101-
sink.asExpr() = call.getAnArgument() and
102-
sink.asConvertedExpr() instanceof ReferenceDereferenceExpr
103-
)
104-
or
105-
exists(ReadSideEffectInstruction read |
106-
read.getSideEffectOperand() = sink.asOperand() and
107-
read.getPrimaryInstruction().(CallInstruction).getStaticCallTarget().hasName("sink")
98+
sink.asExpr() = call.getAnArgument()
10899
)
109100
}
110101

0 commit comments

Comments
 (0)