summary refs log tree commit diff
path: root/iconvdata/unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/unicode.c')
-rw-r--r--iconvdata/unicode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/iconvdata/unicode.c b/iconvdata/unicode.c
index c88f75dd85..df452d2a1d 100644
--- a/iconvdata/unicode.c
+++ b/iconvdata/unicode.c
@@ -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.  */			      \