CWE-588

Attempt to Access Child of a Non-structure Pointer

Medium

Description

Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption.

Potential Impact

How to Fix

Requirements

The choice could be made to use a language that is not susceptible to these issues.

Implementation

Review of type casting operations can identify locations where incompatible types are cast.

Detection Methods

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-588 vulnerabilities in your codebase.

Get Security Assessment