Skip to content

Commit f7a1a4c

Browse files
committed
C++/NonConstantFormat
1 parent 2756e82 commit f7a1a4c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,10 @@ module NonConstFlowConfig implements DataFlow::ConfigSig {
171171

172172
predicate observeDiffInformedIncrementalMode() { any() }
173173

174-
Location getASelectedSourceLocation(DataFlow::Node source) { none() }
175-
176174
Location getASelectedSinkLocation(DataFlow::Node sink) {
177-
result = sink.getLocation()
178-
or
179-
exists(FormattingFunctionCall call, Expr formatString | result = call.getLocation() |
175+
exists(FormattingFunctionCall call, Expr formatString |
176+
result = [call.getLocation(), sink.getLocation()]
177+
|
180178
isSinkImpl(sink, formatString) and
181179
call.getArgument(call.getFormatParameterIndex()) = formatString
182180
)

0 commit comments

Comments
 (0)