devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=62b8c967b42247a29d64086d3588e99878ea31e5

commit 62b8c967b42247a29d64086d3588e99878ea31e5
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Sun Apr 12 20:58:59 2015 -0400

    edje: Fix dereference null return value
    
    Summary: Fix Coverity CID1287154. _alloc function can return null
    however 'color' was never checked after call to _alloc and thus Could
    be NULL.
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/edje/edje_edit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 2f95c5b..b751223 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -6782,7 +6782,9 @@ edje_edit_state_map_point_color_set(Evas_Object *obj, 
const char *part, const ch
 
    if (!color)
      {
-        color = _alloc(sizeof(Edje_Map_Color));
+        if (!(color = _alloc(sizeof(Edje_Map_Color))))
+          return EINA_FALSE;
+
         pd->map.colors_count++;
         pd->map.colors =
            realloc(pd->map.colors,

-- 


Reply via email to