cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3d2a46a417aa173f8d3ec4faebe62a0ea07959c5

commit 3d2a46a417aa173f8d3ec4faebe62a0ea07959c5
Author: Mykyta Biliavskyi <m.biliavs...@samsung.com>
Date:   Thu Jul 10 10:38:26 2014 +0200

    edje: Edje_Edit - fix size memory calculating for realloc array of tweens.
    
    Summary:
    If in _Edje_Part_Description_Spec_Image->tweens wasn't added no one image,
    when edje object was loaded from file, then realloc will work as free(), 
because size
    of reallocating memory always will equal 0.
    
    @fix
    
    Reviewers: raster, seoz, cedric, Hermet, reutskiy.v.v
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1160
    
    Signed-off-by: Cedric BAIL <c.b...@partner.samsung.com>
---
 src/lib/edje/edje_edit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index e5db9ba..c437e19 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -7688,7 +7688,7 @@ edje_edit_state_tween_add(Evas_Object *obj, const char 
*part, const char *state,
 
    /* add to tween list */
    tmp = realloc(img->image.tweens,
-                sizeof (Edje_Part_Image_Id*) * img->image.tweens_count);
+                 sizeof(Edje_Part_Image_Id *) * (img->image.tweens_count + 1));
    if (!tmp)
      {
        free(i);

-- 


Reply via email to