C++: The data pointed to by 'gets' is also a source of user input.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-02-27 16:25:32 +00:00
parent a5bb093935
commit a4c075f03b

View File

@@ -97,10 +97,11 @@ private class GetsFunction extends DataFlowFunction, ArrayFunction, AliasFunctio
}
override predicate hasLocalFlowSource(FunctionOutput output, string description) {
output.isParameterDeref(0) and
description = "string read by " + this.getName()
or
output.isReturnValue() and
(
output.isParameterDeref(0) or
output.isReturnValue() or
output.isReturnValueDeref()
) and
description = "string read by " + this.getName()
}