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