C++: Exclude custom vprintf implementations.

This commit is contained in:
Geoffrey White
2021-01-29 19:25:41 +00:00
parent 527c41520e
commit 03922aa1f5

View File

@@ -50,7 +50,10 @@ predicate primitiveVariadicFormatter(
then formatParamIndex = f.getNumberOfParameters() - 3
else formatParamIndex = f.getNumberOfParameters() - 2
) and
if type = "" then outputParamIndex = -1 else outputParamIndex = 0 // Conveniently, these buffer parameters are all at index 0.
(
if type = "" then outputParamIndex = -1 else outputParamIndex = 0 // Conveniently, these buffer parameters are all at index 0.
) and
not exists(f.getBlock()) // exclude functions with an implementation in the snapshot as they may not be standard implementations.
}
private predicate callsVariadicFormatter(