Merge pull request #12325 from MathiasVP/gets-return-deref

C++: Make `gets` indirect output a LocalFlowSource
This commit is contained in:
Mathias Vorreiter Pedersen
2023-02-27 18:39:36 +00:00
committed by GitHub

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()
}