# HG changeset patch # User Richard M. Stallman # Date 1012538061 0 # Node ID 983767b5ccc09eb5b03148774062d50c45df81f1 # Parent 6502ac0cd9789e8cf627529eace45d315e5a2c81 (decode_composition_emacs_mule): Give up if NCOMPONENT gets too large to index `component'. diff -r 6502ac0cd978 -r 983767b5ccc0 src/coding.c --- a/src/coding.c Fri Feb 01 04:32:56 2002 +0000 +++ b/src/coding.c Fri Feb 01 04:34:21 2002 +0000 @@ -811,6 +811,10 @@ return 0; for (ncomponent = 0; src < src_base + data_len; ncomponent++) { + /* If it is longer than this, it can't be valid. */ + if (ncomponent >= COMPOSITION_DATA_MAX_BUNCH_LENGTH) + return 0; + if (ncomponent % 2 && with_rule) { ONE_MORE_BYTE (gref);