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/20250205.095548~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51d1b5f698c42d444ba058b26ae2f88bb6b2afd9;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 d6630585..b1d0309a 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;