From: Michal Szczecinski Date: Thu, 3 Mar 2022 06:23:24 +0000 (+0100) Subject: evas: ++safety X-Git-Tag: accepted/tizen/unified/20220325.133343~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afc11f68286f35a1d39092ed6c5787f0ed26317e;p=platform%2Fupstream%2Fefl.git evas: ++safety Stability tests detected crash in evas_object_pointer_grab_del function. This commit checks NULL dereference in this API. Change-Id: I2109755e2c38e44ebbf048b32988dd41f7dc0bb0 --- diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index bc440ab..254e9d1 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -129,9 +129,12 @@ void evas_object_pointer_grab_del(Evas_Object_Protected_Data *obj, Evas_Object_Pointer_Data *pdata) { - if ((pdata->mouse_grabbed > 0) && (obj->layer) && (obj->layer->evas)) + //TIZEN_ONLY(20220304): evas: ++safety + if ((pdata->mouse_grabbed > 0) && (obj->layer) && (obj->layer->evas) && (pdata->evas_pdata->seat)) pdata->evas_pdata->seat->mouse_grabbed -= pdata->mouse_grabbed; - if (((pdata->mouse_in && pdata->evas_pdata->seat->mouse_grabbed == 0) || + + //TIZEN_ONLY(20220304): evas: ++safety + if (((pdata->mouse_in && pdata->evas_pdata->seat && pdata->evas_pdata->seat->mouse_grabbed == 0) || (pdata->mouse_grabbed > 0)) && (obj->layer) && (obj->layer->evas)) {