summaryrefslogtreecommitdiff
path: root/src/locale
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-05-03 13:44:53 -0500
committerRich Felker <dalias@aerifal.cx>2018-05-09 16:27:46 -0400
commit99f4237a691349b24afbed29abf33124b89c1ea3 (patch)
treebd587f14955b932ad1d0372ef6bdac7001dfccd5 /src/locale
parent55a661ff5ec5c8192091ec0bd74424500761b08d (diff)
downloadmusl-99f4237a691349b24afbed29abf33124b89c1ea3.tar.gz
fix iconv conversion to UTF-32 with implicit (big) endianness
maintainer's notes: commit 95c6044e2ae85846330814c4ac5ebf4102dbe02c 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.
Diffstat (limited to 'src/locale')
-rw-r--r--src/locale/iconv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
index 3c1f4dd2..3a34395c 100644
--- a/src/locale/iconv.c
+++ b/src/locale/iconv.c
@@ -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;