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/20200225.010716~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c67bbf96f1efc4018b7f997cb25e51cc65ef2fc1;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 a8e225d5..356c2632 100644 --- a/src/evdev-fallback.c +++ b/src/evdev-fallback.c @@ -559,9 +559,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;