提交 de391d12 编写于 作者: M Mattia Dongili 提交者: Dmitry Torokhov

Input: fix typo in keycode validation supporting large scancodes

Check the input_keymap_entry keycode size (u32) instead of the device's
(void*) when validating that keycode value can be stored in the keymap.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722Signed-off-by: NMattia Dongili <malattia@linux.it>
Tested-by: NNorbert Preining <preining@logic.at>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 6f07d31e
......@@ -753,7 +753,7 @@ static int input_default_setkeycode(struct input_dev *dev,
if (index >= dev->keycodemax)
return -EINVAL;
if (dev->keycodesize < sizeof(dev->keycode) &&
if (dev->keycodesize < sizeof(ke->keycode) &&
(ke->keycode >> (dev->keycodesize * 8)))
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册