aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-01-27 13:36:12 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2021-02-27 18:15:09 +0100
commite905e8c217ce9a6e5cadb0a110314482af809aa9 (patch)
tree20be40a7e85ead2accd2ab63ba18759c08c9166c /debug/fgets_u_chk.c
parentaarch64: fix static PIE start code for BTI [BZ #27068] (diff)
downloadglibc-e905e8c217ce9a6e5cadb0a110314482af809aa9.tar.gz
glibc-e905e8c217ce9a6e5cadb0a110314482af809aa9.tar.bz2
glibc-e905e8c217ce9a6e5cadb0a110314482af809aa9.zip
gconv: Fix assertion failure in ISO-2022-JP-3 module (bug 27256)gentoo/glibc-2.32-7
The conversion loop to the internal encoding does not follow the interface contract that __GCONV_FULL_OUTPUT is only returned after the internal wchar_t buffer has been filled completely. This is enforced by the first of the two asserts in iconv/skeleton.c: /* We must run out of output buffer space in this rerun. */ assert (outbuf == outerr); assert (nstatus == __GCONV_FULL_OUTPUT); This commit solves this issue by queuing a second wide character which cannot be written immediately in the state variable, like other converters already do (e.g., BIG5-HKSCS or TSCII). Reported-by: Tavis Ormandy <taviso@gmail.com> (cherry picked from commit 7d88c6142c6efc160c0ee5e4f85cde382c072888) (cherry picked from commit 760e1d287825fa91d4d5a0cc921340c740d803e2)
Diffstat (limited to 'debug/fgets_u_chk.c')
0 files changed, 0 insertions, 0 deletions