Query module CastArrayPointerArithmetic

name
Upcast array used in pointer arithmetic
description
An array with elements of a derived struct type is cast to a pointer to the base type of the struct. If pointer arithmetic or an array dereference is done on the resulting pointer, it will use the width of the base type, leading to misaligned reads.
kind
path-problem
problem.severity
warning
precision
high
tags
correctness reliability security external/cwe/cwe-119 external/cwe/cwe-843
id
cpp/upcast-array-pointer-arithmetic

Imports

DataFlow

Provides a library for local (intra-procedural) and global (inter-procedural) data flow analysis: deciding whether data can flow from a source to a sink.

PathGraph

Provides the query predicates needed to include a graph in a path-problem query.

cpp

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

Predicates

Classes