comparison src/coding.c @ 43041:983767b5ccc0

(decode_composition_emacs_mule): Give up if NCOMPONENT gets too large to index `component'.
author Richard M. Stallman <rms@gnu.org>
date Fri, 01 Feb 2002 04:34:21 +0000
parents e85e4d9494b1
children 5ad6c4210a07 d29ddd7d50f9
comparison
equal deleted inserted replaced
43040:6502ac0cd978 43041:983767b5ccc0
809 nchars = c - 0xA0; 809 nchars = c - 0xA0;
810 if (c < 1) 810 if (c < 1)
811 return 0; 811 return 0;
812 for (ncomponent = 0; src < src_base + data_len; ncomponent++) 812 for (ncomponent = 0; src < src_base + data_len; ncomponent++)
813 { 813 {
814 /* If it is longer than this, it can't be valid. */
815 if (ncomponent >= COMPOSITION_DATA_MAX_BUNCH_LENGTH)
816 return 0;
817
814 if (ncomponent % 2 && with_rule) 818 if (ncomponent % 2 && with_rule)
815 { 819 {
816 ONE_MORE_BYTE (gref); 820 ONE_MORE_BYTE (gref);
817 gref -= 32; 821 gref -= 32;
818 ONE_MORE_BYTE (nref); 822 ONE_MORE_BYTE (nref);