CodeQL library for C/C++
codeql/cpp-all 0.12.9 (changelog, source)
Search

Predicate primitiveVariadicFormatter

A standard function such as vprintf that has a format parameter and a variable argument list of type va_arg. formatParamIndex indicates the format parameter and type indicates the type of vprintf:

  • "" is a vprintf variant, outputParamIndex is -1.
  • "f" is a vfprintf variant, outputParamIndex indicates the output stream parameter.
  • "s" is a vsprintf variant, outputParamIndex indicates the output buffer parameter.
  • "?" if the type cannot be determined. outputParamIndex is -1.

Import path

import cpp
predicate primitiveVariadicFormatter(TopLevelFunction f, string type, int formatParamIndex, int outputParamIndex)