Scratch buffer size computed as a 64-bit integer is passed directly to internal_decode_alloc_buffer without checking for size_t integer truncation. On 32-bit systems (ILP32), this can result in an undersized buffer allocation and subsequent heap-based buffer overflow.
Rule Explorer
Search the public rule index by CVE, GHSA, CWE, language, framework, author, or rule slug. Filter by language, framework, severity, confidence, license, and validation status.
- Public rules
- 4797
- Downloads
- 7.5M
- Verified
- 4797
- Authors
- 2
A numeric value is truncated using `.intValue()` before its bounds are checked. If the original number (e.g. a 64-bit `Long`) is outside the 32-bit integer range, it can silently wrap around. This wrapped value may evade bounds checking constraints, allowing the system to enter an unsafe or unbounded state. Perform bounds validation against the original un-t
A 64-bit integer value is narrowed or truncated to a 32-bit int before bounds validation, which can allow values exceeding 32-bit limits to wrap around and bypass size checks.
An integer truncation occurs when a 64-bit array element is assigned to a 32-bit integer. When this truncated value is subsequently used in a function call (such as a memory allocation size), it can result in allocating an undersized buffer, leading to an overflow. Ensure the variable is of an adequate type (e.g., `uint64_t`) and implement bounds checking on