mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: Exclude custom vprintf implementations.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user