This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
utf-16 iconv requires aligned buffer
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: utf-16 iconv requires aligned buffer
- From: Bruno Haible <haible at ilog dot fr>
- Date: Tue, 14 Mar 2000 17:32:26 +0100 (MET)
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