Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 527c415 commit 03922aaCopy full SHA for 03922aa
1 file changed
cpp/ql/src/semmle/code/cpp/commons/Printf.qll
@@ -50,7 +50,10 @@ predicate primitiveVariadicFormatter(
50
then formatParamIndex = f.getNumberOfParameters() - 3
51
else formatParamIndex = f.getNumberOfParameters() - 2
52
) and
53
- if type = "" then outputParamIndex = -1 else outputParamIndex = 0 // Conveniently, these buffer parameters are all at index 0.
+ (
54
+ if type = "" then outputParamIndex = -1 else outputParamIndex = 0 // Conveniently, these buffer parameters are all at index 0.
55
+ ) and
56
+ not exists(f.getBlock()) // exclude functions with an implementation in the snapshot as they may not be standard implementations.
57
}
58
59
private predicate callsVariadicFormatter(
0 commit comments