bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=296446b87807f298b0f5663ccd42255205970864
commit 296446b87807f298b0f5663ccd42255205970864 Author: Marcel Hollerbach <marcel-hollerb...@t-online.de> Date: Mon Sep 26 11:29:12 2016 +0200 ecore_wl2: fix null dereference issue if we dont get the userdata of a offer something in the protocol went very very bad, we should not emit there a error, just return. Also if we are getting a null offer we should dereference the nulled out offer object. This fixes CID 1363214 --- src/lib/ecore_wl2/ecore_wl2_dnd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index de61fdf..9138c75 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -226,7 +226,7 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct if (!input->drag) { ERR("Userdata of offer not found"); - goto emit; + return; } input->drag->serial = serial; @@ -245,14 +245,14 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct input->drag = NULL; } -emit: ev = calloc(1, sizeof(Ecore_Wl2_Event_Dnd_Enter)); if (!ev) return; if (input->focus.keyboard) ev->source = input->focus.keyboard->id; + if (input->drag) + ev->win = input->drag->window_id; - ev->win = input->drag->window_id; ev->x = x; ev->y = y; ev->offer = input->drag; --