CVE-2026-58469: Backward Pointer Underread

A backward-searching loop decrements a pointer while inspecting its preceding character, but lacks a lower-bound check. This can lead to a heap buffer underread if the expected stopping character is absent. Ensure the pointer is checked against the start of the buffer (e.g., `ptr > start`) before dereferencing.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2026-58469-backward-pointer-underread --engine opengrep

Description

A backward-searching loop decrements a pointer while inspecting its preceding character, but lacks a lower-bound check. This can lead to a heap buffer underread if the expected stopping character is absent. Ensure the pointer is checked against the start of the buffer (e.g., `ptr > start`) before dereferencing.