bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5f4c9a4458a744443837ca8b85139eac279b42f0
commit 5f4c9a4458a744443837ca8b85139eac279b42f0 Author: Yeongjong Lee <[email protected]> Date: Wed Aug 21 07:43:55 2019 +0000 efl_ui_widget: fix dereference null return value issues Dereference null return value issues is reported by Coverity. If `sd` is NULL, it will return zero values. Reviewed-by: Marcel Hollerbach <[email protected]> Differential Revision: https://phab.enlightenment.org/D9668 --- src/lib/elementary/efl_ui_widget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index abcbc9b3c1..7da9d5c030 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -5615,6 +5615,7 @@ static Efl_Canvas_Layout_Part_Type _efl_ui_widget_part_efl_canvas_layout_part_type_get(const Eo *obj EINA_UNUSED, Elm_Part_Data *pd) { Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(pd->obj, MY_CLASS); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EFL_CANVAS_LAYOUT_PART_TYPE_NONE); return efl_canvas_layout_part_type_get(efl_part(sd->resize_obj, pd->part)); } @@ -5622,6 +5623,7 @@ static Eina_Rect _efl_ui_widget_part_efl_gfx_entity_geometry_get(const Eo *obj EINA_UNUSED, Elm_Part_Data *pd) { Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(pd->obj, MY_CLASS); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_RECT_EMPTY()); return efl_gfx_entity_geometry_get(efl_part(sd->resize_obj, pd->part)); } --
