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_list X-Git-Tag: submit/tizen/20210107.083851~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb35941ca53006303343aa80563f3744306e6cfc;p=platform%2Fupstream%2Flibinput.git evdev: remove unreachable code and add exception handling code for aux_data_list Change-Id: I7e2a936cece97d7a8ecce90fa261976514e35371 Signed-off-by: Sung-Jin Park --- diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c index 01864285..c9e68275 100644 --- a/src/evdev-fallback.c +++ b/src/evdev-fallback.c @@ -551,9 +551,10 @@ fallback_process_touch_extra_aux_data(struct fallback_dispatch *dispatch, struct list *current_axis_list; if (!dispatch->mt.aux_data_list) return false; + if (dispatch->mt.slot < 0 || dispatch->mt.slot >= dispatch->mt.slots_len) + return false; current_axis_list = &dispatch->mt.aux_data_list[dispatch->mt.slot]; - if (!current_axis_list) return false; if (list_empty(current_axis_list)) return false;