]> git.eshelyaron.com Git - emacs.git/commitdiff
(coding_restore_composition): Check invalid
authorKenichi Handa <handa@m17n.org>
Mon, 2 Feb 2004 12:09:36 +0000 (12:09 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 2 Feb 2004 12:09:36 +0000 (12:09 +0000)
composition data more rigidly.

src/ChangeLog
src/coding.c

index 98584a9b324254109df32079bbfc271bc73e80c1..9a93ac894ca3a81504dfc46e447bd798ba5d81d6 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-02  Kenichi Handa  <handa@m17n.org>
+
+       * coding.c (coding_restore_composition): Check invalid
+       composition data more rigidly.
+
 2004-01-30  Luc Teirlinck  <teirllm@auburn.edu>
 
        * fileio.c (Fread_file_name_internal): Correctly handle the case
index d9620b907221f7f3d251cd78a8dfb4bc3d23b70f..7880e439e9dba2fdfc46d5374ae34bf01d406030 100644 (file)
@@ -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