From 09721b316cebc6dca2a6148f38de6c96b31cdea6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 2 Feb 2004 12:09:36 +0000 Subject: [PATCH] (coding_restore_composition): Check invalid composition data more rigidly. --- src/ChangeLog | 5 +++++ src/coding.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 98584a9b324..9a93ac894ca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-02-02 Kenichi Handa + + * coding.c (coding_restore_composition): Check invalid + composition data more rigidly. + 2004-01-30 Luc Teirlinck * fileio.c (Fread_file_name_internal): Correctly handle the case 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 -- 2.39.2