aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/euc-jp.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/euc-jp.c')
-rw-r--r--iconvdata/euc-jp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/iconvdata/euc-jp.c b/iconvdata/euc-jp.c
index fc0794d700..39cf6a8b7a 100644
--- a/iconvdata/euc-jp.c
+++ b/iconvdata/euc-jp.c
@@ -96,6 +96,16 @@
{ \
/* This is code set 2: half-width katakana. */ \
ch = jisx0201_to_ucs4 (ch2); \
+ if (__builtin_expect (ch, 0) == __UNKNOWN_10646_CHAR) \
+ { \
+ /* Illegal character. */ \
+ if (! ignore_errors_p ()) \
+ { \
+ /* This is an illegal character. */ \
+ result = __GCONV_ILLEGAL_INPUT; \
+ break; \
+ } \
+ \
inptr += 2; \
} \
else \