woohyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8988a02744a0639e1c2724dac0193814f83ce38b

commit 8988a02744a0639e1c2724dac0193814f83ce38b
Author: Wonki Kim <wonki_....@samsung.com>
Date:   Tue Feb 13 13:15:18 2018 +0900

    evas_polygon: Fix segfault while creating the object
    
    Summary:
    Calling evas_object_polygon_add(NULL) cause segmentation fault,
    because there has been removed null check logic in 
evas_object_polygon_add(0ff7429)
    
    This patch fix the problem.
    
    Test Plan:
            1. Call evas_object_polygon_add(NULL)
            2. Check segmentation fault happen
    
    Reviewers: cedric, jpeg, woohyun, jypark
    
    Differential Revision: https://phab.enlightenment.org/D5801
---
 src/lib/evas/canvas/evas_object_polygon.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_polygon.c 
b/src/lib/evas/canvas/evas_object_polygon.c
index b1649de152..c0f11a6885 100644
--- a/src/lib/evas/canvas/evas_object_polygon.c
+++ b/src/lib/evas/canvas/evas_object_polygon.c
@@ -84,6 +84,9 @@ static const Evas_Object_Func object_func =
 EAPI Evas_Object *
 evas_object_polygon_add(Evas *e)
 {
+   MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+   return NULL;
+   MAGIC_CHECK_END();
    return efl_add(MY_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
 }
 

-- 


Reply via email to