citrus_johab.c: invalid range checking, can't convert "\xde\xf1 - "\xde\xfe"

Issue #87 closed
Takehiko NOZAKI repo owner created an issue

_citrus_JOHAB_stdenc_cstowc must accept idx <= 0x2C7E, not idx <= 0x2C71.

diff --git a/lib/libc/citrus/modules/citrus_johab.c b/lib/libc/citrus/modules/citrus_johab.c
index b580bd2..1e4d638 100644
--- a/lib/libc/citrus/modules/citrus_johab.c
+++ b/lib/libc/citrus/modules/citrus_johab.c
@@ -312,7 +312,7 @@ _citrus_JOHAB_stdenc_cstowc(_JOHABEncodingInfo * __restrict ei,
                *wc = (wchar_t)idx;
                break;
        case 2:
-               if (idx >= 0x2121 && idx <= 0x2C71) {
+               if (idx >= 0x2121 && idx <= 0x2C7E) {
                        m = 0xD9;
                        n = 0x21;
                } else if (idx >= 0x4A21 && idx <= 0x7D7E) {

Comments (3)

  1. Log in to comment