aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/euc-jp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-28 18:11:30 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-28 18:11:30 +0000
commit392ac9698469dbf25826fa8dcd21811dd8abe5e8 (patch)
tree2e76fe580626ba23236857883ec2c9833765622d /iconvdata/euc-jp.c
parent044ff6223a1787c61eca915338e8be61e1eb9b42 (diff)
downloadglibc-392ac9698469dbf25826fa8dcd21811dd8abe5e8.zip
glibc-392ac9698469dbf25826fa8dcd21811dd8abe5e8.tar.gz
glibc-392ac9698469dbf25826fa8dcd21811dd8abe5e8.tar.bz2
Update.
* iconvdata/euc-jp.c: In conversion to UCS4, handling invalid sequences with first by 0x8e correctly.
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 fc0794d..39cf6a8 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 \