CVE-2026-41415: Pjsip Pj Str Slen Underflow On Delimiter Strip

A pj_str_t-style length field is decremented by 2 after only checking the first byte (typically to strip a pair of delimiters such as '<' '>') with no prior verification that slen >= 2. If the string is shorter than the assumed delimiter pair, slen underflows. Because pj_str_t.slen (pj_ssize_t, signed) is implicitly converted to the unsigned pj_size_t accept

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0C
greprules fetch cve-2026-41415-pjsip-pj-str-slen-underflow-on-delimiter-strip --engine opengrep

Description

A pj_str_t-style length field is decremented by 2 after only checking the first byte (typically to strip a pair of delimiters such as '<' '>') with no prior verification that slen >= 2. If the string is shorter than the assumed delimiter pair, slen underflows. Because pj_str_t.slen (pj_ssize_t, signed) is implicitly converted to the unsigned pj_size_t accept