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: accepted/tizen/unified/20240105.013022~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5914e5dcd812e68940a159c53246f174bc7cd61c;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 091a752a..6b9b4a65 100644 --- a/src/evdev-fallback.c +++ b/src/evdev-fallback.c @@ -496,9 +496,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;