mirror of git://git.musl-libc.org/musl
fix iconv conversion to UTF-32 with implicit (big) endianness
maintainer's notes:
commit 95c6044e2a
split UTF-32 and
UTF-32BE but neglected to add a case for the former as a destination
encoding, resulting in it wrongly being handled by the default case.
the intent was that the value of the macro be chosen to encode "big
endian" in the low bits, so that no code would be needed, but this was
botched; instead, handle it the way UCS2 is handled.
This commit is contained in:
parent
55a661ff5e
commit
99f4237a69
|
@ -646,6 +646,8 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
|
|||
*out += 4;
|
||||
*outb -= 4;
|
||||
break;
|
||||
case UTF_32:
|
||||
totype = UTF_32BE;
|
||||
case UTF_32BE:
|
||||
case UTF_32LE:
|
||||
if (*outb < 4) goto toobig;
|
||||
|
|
Loading…
Reference in New Issue