Skip to content

Commit 2f56baa

Browse files
committed
[DIFF-INFORMED] C++: NonConstantFormat
1 parent e382cb5 commit 2f56baa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,19 @@ module NonConstFlowConfig implements DataFlow::ConfigSig {
168168
cannotContainString(t)
169169
)
170170
}
171+
172+
predicate observeDiffInformedIncrementalMode() { any() }
173+
174+
Location getASelectedSourceLocation(DataFlow::Node source) { none() }
175+
176+
Location getASelectedSinkLocation(DataFlow::Node sink) {
177+
result = sink.getLocation()
178+
or
179+
exists(FormattingFunctionCall call, Expr formatString | result = call.getLocation() |
180+
isSinkImpl(sink, formatString) and
181+
call.getArgument(call.getFormatParameterIndex()) = formatString
182+
)
183+
}
171184
}
172185

173186
module NonConstFlow = TaintTracking::Global<NonConstFlowConfig>;

0 commit comments

Comments
 (0)