CWE-588

Attempt to Access Child of a Non-structure Pointer

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

Mitigation

Phase: Requirements

Description:

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

Phase: Implementation

Description:

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

No CAPEC attack patterns related to this CWE.

Back to CWE stats page