From: Stefan Schmidt Date: Thu, 13 Jun 2013 15:34:06 +0000 (+0100) Subject: elm_gesture_layer: Fix potential NULL pointer dereference. X-Git-Tag: submit/tizen_2.2/20130714.145026~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e42175057180abb452d192588cb6563c2a1199e6;p=framework%2Fuifw%2Felementary.git elm_gesture_layer: Fix potential NULL pointer dereference. If _pointer_even_make is false pe stays NULL and might get dereferenced later. Instead we return now if _pointer_event_make fails. Thanks to Tom for consulting with the gesture layer code. Change-Id: I5050639235b9f2922c8ff242b7dc6641d0041952 --- diff --git a/src/lib/elm_gesture_layer.c b/src/lib/elm_gesture_layer.c index 79d82ae..5e8db21 100644 --- a/src/lib/elm_gesture_layer.c +++ b/src/lib/elm_gesture_layer.c @@ -1346,8 +1346,10 @@ _event_process(void *data, evas_object_ref(data); /* Start testing candidate gesture from here */ - if (_pointer_event_make(data, event_info, event_type, &_pe)) - pe = &_pe; + if (!_pointer_event_make(data, event_info, event_type, &_pe)) + return; + + pe = &_pe; /* Test all the gestures */ {