mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
C++: Autoformat.
This commit is contained in:
@@ -136,26 +136,22 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction {
|
||||
int getSizeParameterIndex() { none() }
|
||||
|
||||
override predicate hasArrayWithNullTerminator(int bufParam) {
|
||||
bufParam = getFormatParameterIndex()
|
||||
}
|
||||
bufParam = getFormatParameterIndex()
|
||||
}
|
||||
|
||||
override predicate hasArrayWithVariableSize(int bufParam, int countParam) {
|
||||
bufParam = getOutputParameterIndex() and
|
||||
countParam = getSizeParameterIndex()
|
||||
bufParam = getOutputParameterIndex() and
|
||||
countParam = getSizeParameterIndex()
|
||||
}
|
||||
|
||||
override predicate hasArrayWithUnknownSize(int bufParam) {
|
||||
bufParam = getOutputParameterIndex() and
|
||||
not exists(getSizeParameterIndex())
|
||||
bufParam = getOutputParameterIndex() and
|
||||
not exists(getSizeParameterIndex())
|
||||
}
|
||||
|
||||
predicate hasArrayInput(int bufParam) {
|
||||
bufParam = getFormatParameterIndex()
|
||||
}
|
||||
predicate hasArrayInput(int bufParam) { bufParam = getFormatParameterIndex() }
|
||||
|
||||
predicate hasArrayOutput(int bufParam) {
|
||||
bufParam = getOutputParameterIndex()
|
||||
}
|
||||
predicate hasArrayOutput(int bufParam) { bufParam = getOutputParameterIndex() }
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
|
||||
input.isParameterDeref(getFormatParameterIndex()) and
|
||||
|
||||
Reference in New Issue
Block a user