(BODY for FROM_LOOP): Bytes 0x81..0xA0, 0xFA..0xFF are invalid.
authordrepper <drepper>
Tue, 5 Sep 2000 01:49:40 +0000 (01:49 +0000)
committerdrepper <drepper>
Tue, 5 Sep 2000 01:49:40 +0000 (01:49 +0000)
iconvdata/big5.c

index 9cf5a5f..8748036 100644 (file)
@@ -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;                                                             \