CodeQL library for C/C++
Search

Module Dereferenced

Provides predicates for detecting whether an expression dereferences a pointer.

Import path

import semmle.code.cpp.controlflow.Dereferenced

Imports

ArrayFunction

Provides an abstract class for accurate modeling of input and output buffers in library functions when source code is not available. To use this QL library, create a QL class extending ArrayFunction with a characteristic predicate that selects the function or set of functions you are trying to model. Within that class, override the predicates provided by ArrayFunction to match the flow within that function. Finally, add a private import statement to Models.qll

Nullness

Provides classes and predicates for working with null values and checks for nullness.

cpp

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

Predicates

callDereferences

Holds if the call fc will dereference argument i.

dereferenced

Holds if e will be dereferenced after being evaluated.

dereferencedByOperation

Holds if evaluation of op dereferences e.

functionDereferences

Holds if the body of a function f is likely to dereference its ith parameter unconditionally. This analysis does not account for reassignment.