aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c4
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);