Common Weakness Enumeration

    CWE Definition / CWE-194

    CWE-194: Unexpected Sign Extension

    The product performs an operation on a number that causes it to be sign extended when it is transformed into a larger data type. When the original number is negative, this can produce unexpected values that lead to resultant weaknesses.

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

    Related Weakness

    CWE-681: Incorrect Conversion between Numeric Types

    CWE-681: Incorrect Conversion between Numeric Types

    CWE-681: Incorrect Conversion between Numeric Types