utf-16 iconv requires aligned buffer

Bruno Haible haible@ilog.fr
Tue Mar 14 08:33:00 GMT 2000


iconvdata/utf-16.c accesses the buffer through casts to (uint16_t *).
But the caller of iconv() is allowed to pass buffers at an odd address.
On CPUs with strict alignment checking, like SPARC, this will give
an alignment fault. utf-16.c should access the buffer byte after byte.

Bruno


More information about the Libc-alpha mailing list