We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 72fddaf + cd68836 commit c24651cCopy full SHA for c24651c
cpp/ql/src/semmle/code/cpp/commons/Printf.qll
@@ -258,14 +258,7 @@ class FormatLiteral extends Literal {
258
* Gets the position in the string at which the nth conversion specifier
259
* starts.
260
*/
261
- int getConvSpecOffset(int n) {
262
- n = 0 and result = this.getFormat().indexOf("%", 0, 0)
263
- or
264
- n > 0 and
265
- exists(int p |
266
- n = p + 1 and result = this.getFormat().indexOf("%", 0, this.getConvSpecOffset(p) + 2)
267
- )
268
- }
+ int getConvSpecOffset(int n) { result = this.getFormat().indexOf("%", n, 0) }
269
270
/*
271
* Each of these predicates gets a regular expressions to match each individual
0 commit comments