mirror of
https://github.com/github/codeql.git
synced 2025-12-23 20:26:32 +01:00
Merge pull request #12325 from MathiasVP/gets-return-deref
C++: Make `gets` indirect output a LocalFlowSource
This commit is contained in:
@@ -97,10 +97,11 @@ private class GetsFunction extends DataFlowFunction, ArrayFunction, AliasFunctio
|
|||||||
}
|
}
|
||||||
|
|
||||||
override predicate hasLocalFlowSource(FunctionOutput output, string description) {
|
override predicate hasLocalFlowSource(FunctionOutput output, string description) {
|
||||||
output.isParameterDeref(0) and
|
(
|
||||||
description = "string read by " + this.getName()
|
output.isParameterDeref(0) or
|
||||||
or
|
output.isReturnValue() or
|
||||||
output.isReturnValue() and
|
output.isReturnValueDeref()
|
||||||
|
) and
|
||||||
description = "string read by " + this.getName()
|
description = "string read by " + this.getName()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user