edje_entry: fix out-ouf-bounds issue in _edje_entry_imf_event_preedit_changed_cb
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 27 Nov 2013 00:31:26 +0000 (09:31 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 27 Nov 2013 00:31:26 +0000 (09:31 +0900)
The maximum index of tagname is 7, and preedit_type_size is equal to 8.
Checking "attr->preedit_type <= preedit_type_size" implies that the value of "attr->preedit_type" may be up to 8

This patch fixes CID 1039308

src/lib/edje/edje_entry.c

index e8afc55..4c5ce65 100644 (file)
@@ -3999,7 +3999,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA
           {
              EINA_LIST_FOREACH(attrs, l, attr)
                {
-                  if (attr->preedit_type <= preedit_type_size &&
+                  if (attr->preedit_type < preedit_type_size &&
                       tagname[attr->preedit_type])
                     {
                        preedit_attr_str = eina_strbuf_new();