diff options
author | Mrunal Sovani <mrunal.s@samsung.com> | 2015-09-24 14:57:10 +0100 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2015-09-24 14:59:01 +0100 |
commit | 9ed199d7098098d48778b706d057efa9f3497d58 (patch) | |
tree | ca61caef5a0b61dc841d139d93ce706df7733981 | |
parent | 17b4622f1b319d8330a9f441d259e6b15e200aa7 (diff) | |
download | efl-9ed199d7098098d48778b706d057efa9f3497d58.tar.gz |
Evas smart: Add obj type safety check to callback_del.
Summary:
Evas_Smart_Data retrieved from eo_data_scope_get might be NULL
in case the input Evas_Object is not valid Evas_Object.
The smart data gets dereferenced and can cause a crash if its NULL
Hence return in case smart data is NULL.
@fix
Signed-off-by: Mrunal Sovani <mrunal.s@samsung.com>
Reviewers: raster, Hermet, tasn
Reviewed By: tasn
Subscribers: singh.amitesh, cedric, sachin.dev
Differential Revision: https://phab.enlightenment.org/D3106
-rw-r--r-- | src/lib/evas/canvas/evas_object_smart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index cacc5a4fe5..1529f75f1b 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -722,6 +722,7 @@ evas_object_smart_callback_del(Evas_Object *eo_obj, const char *event, Evas_Smar return NULL; MAGIC_CHECK_END(); o = eo_data_scope_get(eo_obj, MY_CLASS); + if (!o) return NULL; if (!event) return NULL; const Eo_Event_Description *eo_desc = eo_base_legacy_only_event_description_get(event); |