raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=18388f33c78702a3ffee284a4e687976c2119031
commit 18388f33c78702a3ffee284a4e687976c2119031 Author: Wonki Kim <[email protected]> Date: Fri Oct 13 12:00:59 2017 -0700 elmentary: fix a potential null pointer dereferencing in elm_box Summary: if 'evas_object_smart_data_get' return null somehow, logic that dereference the smart data pointer will cause problems. This patch prevent a potential bug in advance. Reviewers: jpeg, woohyun, cedric Differential Revision: https://phab.enlightenment.org/D5290 Signed-off-by: Cedric Bail <[email protected]> --- src/lib/elementary/elm_box.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_box.c b/src/lib/elementary/elm_box.c index 2944096d6b..3655f36c83 100644 --- a/src/lib/elementary/elm_box.c +++ b/src/lib/elementary/elm_box.c @@ -544,8 +544,11 @@ _elm_box_unpack_all(Eo *obj, Elm_Box_Data *pd) /* set this to block _sizing_eval() calls */ pd->delete_me = EINA_TRUE; bd = evas_object_smart_data_get(wd->resize_obj); - EINA_LIST_FOREACH (bd->children, l, opt) - children = eina_list_append(children, opt->obj); + if (bd) + { + EINA_LIST_FOREACH (bd->children, l, opt) + children = eina_list_append(children, opt->obj); + } pd->delete_me = EINA_FALSE; /* EINA_FALSE means do not delete objects */ --
