Edje_Edit: fix defect found by Coverity in ...state_tween_insert_at 26/82026/2
authorVitalii Vorobiov <vi.vorobiov@samsung.com>
Fri, 19 Feb 2016 11:22:07 +0000 (11:22 +0000)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Wed, 3 Aug 2016 09:10:34 +0000 (02:10 -0700)
Check constraits before creating image structures

CID 1351558

Change-Id: Ifd65d85b0a0de228bba4afc38639a06039486648

src/lib/edje/edje_edit.c

index 1d37359..1c3e8dc 100644 (file)
@@ -8768,7 +8768,10 @@ edje_edit_state_tween_insert_at(Evas_Object *obj, const char *part, const char *
    img = (Edje_Part_Description_Image *)pd;
 
    if ((unsigned)place > img->image.tweens_count)
-     return EINA_FALSE;
+     {
+        free(i);
+        return EINA_FALSE;
+     }
 
    /* add to tween list */
    tmp = realloc(img->image.tweens,