Skip to content

Commit 9c277b3

Browse files
committed
C++: Fix a small bug in the ArrayFunction model for FormattingFunction.
1 parent 510bce3 commit 9c277b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/semmle/code/cpp/models/interfaces/FormattingFunction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction {
167167

168168
override predicate hasArrayInput(int bufParam) { bufParam = getFormatParameterIndex() }
169169

170-
override predicate hasArrayOutput(int bufParam) { bufParam = getOutputParameterIndex() }
170+
override predicate hasArrayOutput(int bufParam) { bufParam = getOutputParameterIndex() and not isOutputStream() }
171171

172172
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
173173
exists(int arg |

0 commit comments

Comments
 (0)