]> git.baikalelectronics.ru Git - kernel.git/commit
thinkpad_acpi: off by one in adaptive_keyboard_hotkey_notify_hotkey()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 11 Mar 2015 09:36:07 +0000 (12:36 +0300)
committerDarren Hart <dvhart@linux.intel.com>
Sat, 14 Mar 2015 19:00:19 +0000 (12:00 -0700)
commitabd03d270671106fc19d169299dc3ddceaa7da69
tree926eb28f569a2ffa67e78b09eb4d4ddb7df8ee27
parentccc866da4ba9aa9ec60bd3aa2348ddbc333cba33
thinkpad_acpi: off by one in adaptive_keyboard_hotkey_notify_hotkey()

This should be >= instead of > because otherwise we read one element
past the end of the hotkey_keycode_map[] array.

The hotkey_keycode_map[] array has TPACPI_HOTKEY_MAP_LEN elements.

Fixes: 7f2fa053e1fb ('thinkpad_acpi: Add support for more adaptive kbd buttons')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-By: Bastien Nocera <hadess@hadess.net>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/thinkpad_acpi.c