From: tomo Date: Sat, 13 Nov 1999 21:52:20 +0000 (+0000) Subject: (Fput_char_attribute): Check each element of VALUE is a byte if X-Git-Tag: r21-2-19-utf-2000-0_12-0~63 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f99164ce3a1c906ec9a7ff893bf4d3e895b9e3f4;p=chise%2Fxemacs-chise.git (Fput_char_attribute): Check each element of VALUE is a byte if ATTRIBUTE is a coded-charset or its name. --- diff --git a/src/mule-charset.c b/src/mule-charset.c index 6daf6af..d093f54 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -571,9 +571,11 @@ Store CHARACTER's ATTRIBUTE with VALUE. Lisp_Object ei = Fcar (rest); if (!INTP (ei)) - signal_simple_error ("Invalid value for coded-charset", - value); - i = XINT (ei) - XCHARSET_BYTE_OFFSET (ccs); + signal_simple_error ("Invalid value for coded-charset", value); + i = XINT (ei); + if ((i < 0) || (255 < i)) + signal_simple_error ("Invalid value for coded-charset", value); + i -= XCHARSET_BYTE_OFFSET (ccs); nv = XVECTOR_DATA(v)[i]; rest = Fcdr (rest); if (CONSP (rest))