edje_edit: fix segmentation fault(Array index is out of bound) 39/166739/2
authorJinYong Park <j4939.park@samsung.com>
Thu, 11 Jan 2018 12:27:25 +0000 (21:27 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 12 Jan 2018 05:45:10 +0000 (05:45 +0000)
@fix

original patch: https://review.tizen.org/gerrit/#/c/99276/

Change-Id: Id16ae2a5c89cdba91f1fee1f409ab768853c1cfc
Signed-off-by: JinYong Park <j4939.park@samsung.com>
src/lib/edje/edje_edit.c

index 5f6dc5e..381122e 100644 (file)
@@ -12043,6 +12043,10 @@ _edje_program_afters_get(Evas_Object *obj, Edje_Program *epr)
      {
         Edje_Program *p = NULL;
 
+        /* TIZEN_ONLY: fix segmentation fault in case of array index is out of bound */
+        if (a->id < 0) continue;
+        /* END */
+
         p = ed->collection->patterns.table_programs[a->id % ed->collection->patterns.table_programs_size];
         if (p && p->name)
           {