summary refs log tree commit diff
path: root/iconvdata/big5.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/big5.c')
-rw-r--r--iconvdata/big5.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/iconvdata/big5.c b/iconvdata/big5.c
index 9cf5a5f6f4..8748036724 100644
--- a/iconvdata/big5.c
+++ b/iconvdata/big5.c
@@ -8644,8 +8644,21 @@ static const char from_ucs4_tab15[][2] =
 									      \
 	inptr += 2;							      \
       }									      \
-    else								      \
+    else if (ch <= 0x80)						      \
       ++inptr;								      \
+    else								      \
+      {									      \
+	/* This is illegal.  */						      \
+	if (! ignore_errors_p ())					      \
+	  {								      \
+	    result = __GCONV_ILLEGAL_INPUT;				      \
+	    break;							      \
+	  }								      \
+									      \
+	++inptr;							      \
+	++*irreversible;						      \
+	continue;							      \
+      }									      \
 									      \
     put32 (outptr, ch);							      \
     outptr += 4;							      \