summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2004-02-02 12:09:36 +0000
committerKenichi Handa <handa@m17n.org>2004-02-02 12:09:36 +0000
commit09721b316cebc6dca2a6148f38de6c96b31cdea6 (patch)
tree90ebcd12382ea1886dec8fb8b13e2bcbb1243542 /src/coding.c
parentc14dc0edf230d5e9757ec3197313b67dde4d46b3 (diff)
downloademacs-09721b316cebc6dca2a6148f38de6c96b31cdea6.tar.gz
(coding_restore_composition): Check invalid
composition data more rigidly.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c
index d9620b90722..7880e439e9d 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -5458,6 +5458,9 @@ coding_restore_composition (coding, obj)
if (method == COMPOSITION_WITH_RULE_ALTCHARS
&& len % 2 == 0)
len --;
+ if (len < 1)
+ /* Invalid composition data. */
+ break;
for (j = 0; j < len; j++)
args[j] = make_number (data[4 + j]);
components = (method == COMPOSITION_WITH_ALTCHARS