Skip to content
OpenAdvisories

Weakness (CWE)

CWE-135: Incorrect Calculation of Multi-Byte String Length

Base Draft

The product does not correctly calculate the length of strings that can contain wide or multi-byte characters.

How to prevent it (2 mitigations)
  1. Implementation

    Always verify the length of the string unit character.

  2. Implementation

    Use length computing functions (e.g. strlen, wcslen, etc.) appropriately with their equivalent type (e.g.: byte, wchar_t, etc.)

Source: MITRE CWE-135

0 results · Clear filters · Feed

Nothing found.