CWE-468

Incorrect Pointer Scaling

Medium

Description

In C and C++, one may often accidentally refer to the wrong memory due to the semantics of when math operations are implicitly scaled.

Potential Impact

How to Fix

Architecture and Design

Use a platform with high-level memory abstractions.

Implementation

Always use array indexing instead of direct pointer manipulation.

Architecture and Design

Use technologies for preventing buffer overflows.

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-468 vulnerabilities in your codebase.

Get Security Assessment