CVE-2024-26256: Integer Underflow Loop Bound

Inadequate minimum bounds check on `$LEN`. The variable is allowed to reach a value that causes an integer underflow when `$SUB` is subtracted in the loop condition, potentially leading to out-of-bounds memory access.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2024-26256-integer-underflow-loop-bound --engine opengrep

Description

Inadequate minimum bounds check on `$LEN`. The variable is allowed to reach a value that causes an integer underflow when `$SUB` is subtracted in the loop condition, potentially leading to out-of-bounds memory access.