mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +00:00
Input: keyboard - fix potential out of bound access to key_map
Reported-by: Michal Roszkowski <michal@roszkowski.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
df08ef27a7
commit
161c609173
@ -1249,7 +1249,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keycode > NR_KEYS)
|
if (keycode >= NR_KEYS)
|
||||||
if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
|
if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
|
||||||
keysym = K(KT_BRL, keycode - KEY_BRL_DOT1 + 1);
|
keysym = K(KT_BRL, keycode - KEY_BRL_DOT1 + 1);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user