comparison src/coding.c @ 53775:68f86fa2b022

(coding_restore_composition): Check invalid composition data more rigidly.
author Kenichi Handa <handa@m17n.org>
date Mon, 02 Feb 2004 12:06:47 +0000
parents 58de40c3a5c1
children 5256a4b9366f
comparison
equal deleted inserted replaced
53774:51a648ff0fe0 53775:68f86fa2b022
5456 Lisp_Object args[MAX_COMPOSITION_COMPONENTS * 2 - 1]; 5456 Lisp_Object args[MAX_COMPOSITION_COMPONENTS * 2 - 1];
5457 5457
5458 if (method == COMPOSITION_WITH_RULE_ALTCHARS 5458 if (method == COMPOSITION_WITH_RULE_ALTCHARS
5459 && len % 2 == 0) 5459 && len % 2 == 0)
5460 len --; 5460 len --;
5461 if (len < 1)
5462 /* Invalid composition data. */
5463 break;
5461 for (j = 0; j < len; j++) 5464 for (j = 0; j < len; j++)
5462 args[j] = make_number (data[4 + j]); 5465 args[j] = make_number (data[4 + j]);
5463 components = (method == COMPOSITION_WITH_ALTCHARS 5466 components = (method == COMPOSITION_WITH_ALTCHARS
5464 ? Fstring (len, args) 5467 ? Fstring (len, args)
5465 : Fvector (len, args)); 5468 : Fvector (len, args));