diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-01-27 13:36:12 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-01-27 15:51:17 +0100 |
commit | e9db77683e10c589529f452710868c3bde2c6d3f (patch) | |
tree | 314d42f61f8b9a2db53d4abf04a1ce2b43c0bc3e /bits/confname.h | |
parent | 44fd8887d0dc705ee5a8e52153282292841e0a01 (diff) | |
download | glibc-e9db77683e10c589529f452710868c3bde2c6d3f.tar.gz glibc-e9db77683e10c589529f452710868c3bde2c6d3f.tar.xz glibc-e9db77683e10c589529f452710868c3bde2c6d3f.zip |
gconv: Fix assertion failure in ISO-2022-JP-3 module (bug 27256)
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)
Diffstat (limited to 'bits/confname.h')
0 files changed, 0 insertions, 0 deletions