diff options
| author | Richard M. Stallman | 2002-02-01 04:34:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-02-01 04:34:21 +0000 |
| commit | b1887814c31f69bfa5620e16ade245a1650046b3 (patch) | |
| tree | bc706392640c8aae14e38ebb278fa46b4f5e67ca /src/coding.c | |
| parent | 345c105fa48978ce66abf87742bdd4e693bb31d8 (diff) | |
| download | emacs-b1887814c31f69bfa5620e16ade245a1650046b3.tar.gz emacs-b1887814c31f69bfa5620e16ade245a1650046b3.zip | |
(decode_composition_emacs_mule):
Give up if NCOMPONENT gets too large to index `component'.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c index 88ff0ca0a83..37a5e886547 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -811,6 +811,10 @@ decode_composition_emacs_mule (coding, src, src_end, | |||
| 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); |