Solutionunvalidated
Add `if (outptr + 4 > outend) { result = __GCONV_FULL_OUTPUT; break; }` guards before the 4-byte writes. Tension: the SS2/SS3 branches never got the same treatment. Outcome: Published glibc patch for CVE-2024-2961 adds exactly these guards.
fec57113-eaf7-409d-82ba-ce6c12dc36cc
Add if (outptr + 4 > outend) { result = __GCONV_FULL_OUTPUT; break; } guards before the 4-byte writes. Tension: the SS2/SS3 branches never got the same treatment. Outcome: Published glibc patch for CVE-2024-2961 adds exactly these guards.