diff options
author | kaleb <empty> | 1995-06-26 20:41:49 +0000 |
---|---|---|
committer | kaleb <empty> | 1995-06-26 20:41:49 +0000 |
commit | f8c75c5c677a992cf12b1711a25c148ce83c1fda (patch) | |
tree | cafbad817a676259472ca77ef0ddc380a977f457 /xc | |
parent | 84b336fb048e4f16e1f624eca88328020d585972 (diff) |
XBUG 7482, bad index on charsets in a codeset
Diffstat (limited to 'xc')
-rw-r--r-- | xc/lib/X11/lcEuc.c | 9 | ||||
-rw-r--r-- | xc/lib/X11/lcSjis.c | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/xc/lib/X11/lcEuc.c b/xc/lib/X11/lcEuc.c index 8767eff4e..703884fdc 100644 --- a/xc/lib/X11/lcEuc.c +++ b/xc/lib/X11/lcEuc.c @@ -1,4 +1,4 @@ -/* $XConsortium: lcEuc.c,v 1.7 94/01/23 16:37:40 kaleb Exp $ */ +/* $XConsortium: lcEuc.c,v 1.9 94/03/29 22:51:55 rws Exp kaleb $ */ /****************************************************************** Copyright 1992, 1993 by FUJITSU LIMITED @@ -768,11 +768,11 @@ initCTptr(lcd) for (i = 0; i < num_codesets; i++) { codeset = codesets[i]; - num_charsets = codesets[i]->num_charsets; + num_charsets = codeset->num_charsets; for (j = 0; j < num_charsets; j++) { - charset = codesets[i]->charset_list[0]; + charset = codeset->charset_list[j]; for (ctdp = ctdata; ctdp <= ctd_endp; ctdp++) @@ -838,6 +838,7 @@ euc_ctstowcs(conv, from, from_left, to, to_left, args, num_args) for (length = ctdata[Ascii].length; *from_left > 0; (*from_left) -= length) { + ct_type = CT_STD; if (*inbufptr == '\033' || *inbufptr == (char)'\233') { for (ctdp = ctdata; ctdp <= ctd_endp ; ctdp++) { @@ -857,7 +858,6 @@ euc_ctstowcs(conv, from, from_left, to, to_left, args, num_args) break; } } - if (ctdp > ctd_endp) /* failed to match CT sequence */ unconv_num++; } @@ -1088,6 +1088,7 @@ euc_ctstombs(conv, from, from_left, to, to_left, args, num_args) for (length = ctdata[Ascii].length; *from_left > 0; (*from_left) -= length) { + ct_type = CT_STD; if (*inbufptr == '\033' || *inbufptr == (char)'\233') { for (ctdp = ctdata; ctdp <= ctd_endp ; ctdp++) { diff --git a/xc/lib/X11/lcSjis.c b/xc/lib/X11/lcSjis.c index e6cd81fd7..cc6305b42 100644 --- a/xc/lib/X11/lcSjis.c +++ b/xc/lib/X11/lcSjis.c @@ -1,4 +1,4 @@ -/* $XConsortium: lcSjis.c,v 1.10 94/02/10 19:36:09 rws Exp $ */ +/* $XConsortium: lcSjis.c,v 1.13 94/03/29 22:52:06 rws Exp kaleb $ */ /**************************************************************** Copyright 1992, 1993 by FUJITSU LIMITED @@ -839,11 +839,11 @@ initCTptr(lcd) for (i = 0; i < num_codesets; i++) { codeset = codesets[i]; - num_charsets = codesets[i]->num_charsets; + num_charsets = codeset->num_charsets; for (j = 0; j < num_charsets; j++) { - charset = codesets[i]->charset_list[0]; + charset = codeset->charset_list[j]; for (ctdp = ctdata; ctdp <= ctd_endp; ctdp++) @@ -1174,7 +1174,6 @@ sjis_ctstombs(conv, from, from_left, to, to_left, args, num_args) break; } } - if (ctdp > ctd_endp) /* failed to match CT sequence */ unconv_num++; } @@ -1287,7 +1286,6 @@ sjis_ctstowcs(conv, from, from_left, to, to_left, args, num_args) break; } } - if (ctdp > ctd_endp) /* failed to match CT sequence */ unconv_num++; } |