Common Weakness Enumeration

    CWE Definition / CWE-131

    CWE-131: Incorrect Calculation of Buffer Size

    The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.

    Published:19 Jul 2006
    Organization:MITRE
    Modified:11 Dec 2025

    Related Weakness

    CWE-682: Incorrect Calculation

    CWE-682: Incorrect Calculation

    CWE-682: Incorrect Calculation

    CWE-682: Incorrect Calculation

    CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer