Mercurial > emacs
diff 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 |
line wrap: on
line diff
--- 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);
