Module ArithmeticCommon

Import path

Security.CWE.CWE-190.ArithmeticCommon

Imports

DefUse

Provides classes and predicates for def-use and use-use pairs. Built on top of the SSA library for maximal precision.

Dominance

Provides classes and predicates for control-flow graph dominance.

Guards
Overflow

Predicates

guarded

Holds if this expression is (crudely) guarded by use.

guardedAbs

Holds if the size of this use is guarded using Math.abs.

guardedAgainstOverflow

Holds if e is guarded against overflow by use.

guardedAgainstUnderflow

Holds if e is guarded against underflow by use.

guardedGreater

Holds if the size of this use is guarded to be greater than something.

guardedLesser

Holds if the size of this use is guarded to be less than something.

narrowerThanOrEqualTo

Holds if the type of exp is narrower than or equal to numType, or there is an enclosing cast to a type at least as narrow as ‘numType’.

overflowIrrelevant

Holds if overflow/underflow is irrelevant for this expression.

priorAccess

A prior use of the same variable that could see the same value.