Common Weakness Enumeration

    CWE Definition / CWE-193

    CWE-193: Off-by-one Error

    A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

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

    Related Weakness

    CWE-682: Incorrect Calculation

    CWE-682: Incorrect Calculation

    CWE-617: Reachable Assertion

    CWE-170: Improper Null Termination

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