[PATCH v2] Use pending character state in IBM1390, IBM1399 character sets (CVE-2026-4046)

Arjun Shankar arjun@redhat.com
Thu Apr 9 12:31:32 GMT 2026


Hi Andreas,

> > Follow the example in iso-2022-jp-3.c and use the __count state
> > variable to store the pending character.  This avoids restarting
> > the conversion if the output buffer ends between two 4-byte UCS-4
> > code points, so that the assert reported in the bug can no longer
> > happen.
> >
> > Even though the fix is applied to ibm1364.c, the change is only
> > effective for the two HAS_COMBINED codecs for IBM1390, IBM1399.
>
> Ok.

Florian mentioned that the test is auto-generated by an LLM:

> The test case was mostly auto-generated using
> claude-4.6-opus-high-thinking, and composer-2-fast shows up in the log
> as well.  During review, gpt-5.4-xhigh flagged that the original version
> of the test case was not exercising the new character flush logic.

Do you have any objections to this? I'm asking specifically because we
tend to treat maintainers' OK/ACK as post-review approval to commit.

Thanks!
Arjun



More information about the Libc-alpha mailing list