Skip to content

Commit f673791

Browse files
authored
Merge pull request #2717 from jbj/DefaultTaintTracking-memcpy
C++: Add taint from gets through memcpy
2 parents bbb0e21 + 7bed6ad commit f673791

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ private Instruction getACallArgumentOrIndirection(CallInstruction call, int argu
199199

200200
private predicate modelTaintToParameter(Function f, int parameterIn, int parameterOut) {
201201
exists(FunctionInput modelIn, FunctionOutput modelOut |
202-
f.(TaintFunction).hasTaintFlow(modelIn, modelOut) and
202+
(
203+
f.(DataFlowFunction).hasDataFlow(modelIn, modelOut)
204+
or
205+
f.(TaintFunction).hasTaintFlow(modelIn, modelOut)
206+
) and
203207
(modelIn.isParameter(parameterIn) or modelIn.isParameterDeref(parameterIn)) and
204208
modelOut.isParameterDeref(parameterOut)
205209
)

0 commit comments

Comments
 (0)