Skip to content

Commit

Permalink
Input: keyboard - fix potential out of bound access to key_map
Browse files Browse the repository at this point in the history
Reported-by: Michal Roszkowski <michal@roszkowski.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Oct 9, 2008
1 parent df08ef2 commit 161c609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
return;
}

if (keycode > NR_KEYS)
if (keycode >= NR_KEYS)
if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
keysym = K(KT_BRL, keycode - KEY_BRL_DOT1 + 1);
else
Expand Down

0 comments on commit 161c609

Please sign in to comment.