From: Sung-Jin Park Date: Tue, 30 May 2017 06:53:19 +0000 (+0900) Subject: evdev: remove unreachable code and add exception handling code for aux_data_listy X-Git-Tag: submit/tizen/20170531.093153^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d935aa7d1ab37a22efe2865df44d3ba96eeea43f;p=platform%2Fupstream%2Flibinput.git evdev: remove unreachable code and add exception handling code for aux_data_listy Change-Id: I7e2a936cece97d7a8ecce90fa261976514e35371 Signed-off-by: Sung-Jin Park --- diff --git a/src/evdev.c b/src/evdev.c index 37823b4b..dae901c1 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -648,9 +648,10 @@ evdev_process_touch_extra_aux_data(struct evdev_device *device, bool res = false; if (!device->mt.aux_data_list) return false; + if (device->mt.slot < 0 || device->mt.slot >= device->mt.slots_len) + return false; current_axis_list = &device->mt.aux_data_list[device->mt.slot]; - if (!current_axis_list) return false; if (list_empty(current_axis_list)) return false;