1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00
* iconv/gconv_simple.c (internal_ucs4le_loop_unaligned): Return
	__GCONV_EMPTY_INPUT only if input is really empty.  Otherwise
	__GCONV_INCOMPLETE_INPUT.
	(ucs4le_internal_loop): Likewise.
	(ucs4le_internal_loop_unaligned): Likewise.
	* iconvdata/unicode.c (PREPARE_LOOP): Likewise.
	* iconvdata/utf-16.c (PREPARE_LOOP): Likewise.
	* iconvdata/utf-32.c (PREPARE_LOOP): Likewise.

	* iconv/loop.c (LOOPFCT): First test for empty input then for full
	output buffer.
This commit is contained in:
Ulrich Drepper
2002-11-20 23:42:04 +00:00
parent 218d76e034
commit eb9dc2a22d
7 changed files with 46 additions and 22 deletions

View File

@@ -49,7 +49,8 @@
{ \
/* We have to find out which byte order the file is encoded in. */ \
if (inptr + 2 > inend) \
return __GCONV_EMPTY_INPUT; \
return (inptr == inend \
? __GCONV_EMPTY_INPUT : __GCONV_INCOMPLETE_INPUT); \
\
if (get16u (inptr) == BOM) \
/* Simply ignore the BOM character. */ \