mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
C++: Handle builtin FormattingFunctions better
This commit is contained in:
@@ -49,9 +49,12 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction {
|
||||
if this.hasDefinition()
|
||||
then firstFormatArgumentIndex = this.getDefinition().getNumberOfParameters()
|
||||
else
|
||||
forex(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() |
|
||||
firstFormatArgumentIndex = fde.getNumberOfParameters()
|
||||
)
|
||||
if this instanceof BuiltInFunction
|
||||
then firstFormatArgumentIndex = this.getNumberOfParameters()
|
||||
else
|
||||
forex(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() |
|
||||
firstFormatArgumentIndex = fde.getNumberOfParameters()
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets the position at which the format parameter occurs. */
|
||||
|
||||
Reference in New Issue
Block a user