Category: SFP Secondary Cluster: Incorrect Buffer Length Computation

Incomplete
Summary

This category identifies Software Fault Patterns (SFPs) within the Incorrect Buffer Length Computation cluster (SFP10).

Membership
IDNameDescription
CWE-131Incorrect Calculation of Buffer SizeThe product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.
CWE-135Incorrect Calculation of Multi-Byte String LengthThe product does not correctly calculate the length of strings that can contain wide or multi-byte characters.
CWE-467Use of sizeof() on a Pointer TypeThe code calls sizeof() on a pointer type, which can be an incorrect calculation if the programmer intended to determine the size of the data that is being pointed to.
CWE-888Software Fault Pattern (SFP) ClustersCWE identifiers in this view are associated with clusters of Software Fault Patterns (SFPs).
CWE-251Often Misused: String ManagementFunctions that manipulate strings encourage buffer overflows.
Vulnerability Mapping Notes
Usage: Prohibited
Reasons: Category
Rationale:
This entry is a Category. Using categories for mapping has been discouraged since 2019. Categories are informal organizational groupings of weaknesses that can help CWE users with data aggregation, navigation, and browsing. However, they are not weaknesses in themselves.
Comment:
See member weaknesses of this category.