Module InitializationFunctions

Provides classes and predicates for identifying functions that initialize their arguments.

Import path

import Security.CWE.CWE-457.InitializationFunctions

Imports

ExternalArtifact
Guards
NestedFields
SAL
cpp

Provides classes and predicates for working with C/C++ code.

Predicates

getAConditionallyInitializedArgument

Gets an argument which is conditionally initialized by the call to the given target under the given context and evidence.

getAFieldAccess

Get an access of a field on Variable v.

getAnInitializedArgument

Gets an argument which is initialized by the call.

getTarget

Gets a possible target for the Call, using the name and parameter matching if we did not associate this call with a specific definition at link or compile time, and performing simple virtual dispatch resolution.

initializedArgument

Gets the position of an argument to the call which is initialized by the call.

Classes

ConditionalInitializationCall

More elaborate tracking, flagging cases where the status is checked after the potentially uninitialized variable has been used, and ignoring cases where the status is not checked but there is no use of the potentially uninitialized variable, may be obtained via getARiskyAccess.

ConditionalInitializationFunction

A function which initializes one or more of its parameters, but not on all paths.

Context

A context under which a function may be called.

InitializationFunction

A function which initializes one or more of its parameters.

InitializationFunctionCall

A call to an function which initializes one or more of its parameters.

ParameterCheck

A check against a parameter.

ParameterNullCheck

A null-check expression on a parameter.

ValidatedExternalCondInitFunction

An entry in a CSV file in cond-init that contains externally defined functions that are conditional initializers. These files are typically produced by running the ConditionallyInitializedFunction companion query.

Datatypes

Evidence

The type of evidence used to determine whether a function initializes a parameter.