Skip to content

Commit

Permalink
C++: Respond to review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasVP committed Oct 9, 2024
1 parent 6965cf7 commit acac3a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpp/ql/lib/semmle/code/cpp/models/implementations/Fopen.qll
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ private class Fopen extends Function, AliasFunction, SideEffectFunction, TaintFu
}

override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
this.hasGlobalOrStdName(["fopen", "freopen", "_wfopen", "_fsopen", "_wfsopen"]) and
(
this.hasGlobalOrStdName(["fopen", "freopen"]) or
this.hasGlobalName(["_wfopen", "_fsopen", "_wfsopen"])
) and
input.isParameterDeref(0) and
output.isReturnValueDeref()
or
Expand Down

0 comments on commit acac3a0

Please sign in to comment.