# HG changeset patch # User Kenichi Handa # Date 1075723607 0 # Node ID 68f86fa2b022bbf0da506de5c5d43e0364f1f117 # Parent 51a648ff0fe0114d7971bf74f15967d47edc541e (coding_restore_composition): Check invalid composition data more rigidly. diff -r 51a648ff0fe0 -r 68f86fa2b022 src/coding.c --- a/src/coding.c Sun Feb 01 16:40:34 2004 +0000 +++ b/src/coding.c Mon Feb 02 12:06:47 2004 +0000 @@ -5458,6 +5458,9 @@ 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