summaryrefslogtreecommitdiff
path: root/drivers/char/keyboard.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-10-08 23:42:26 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-10-08 23:45:36 -0400
commit161c609173c40a39dc218d97a4a86592dfda31ba (patch)
tree98d170f2a6f0658a30e618b4628cad2a5d2de711 /drivers/char/keyboard.c
parentdf08ef27a7f91961c91a2a718f5d1e616f1c8e57 (diff)
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>
Diffstat (limited to 'drivers/char/keyboard.c')
-rw-r--r--drivers/char/keyboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 7b3a212c86b1..de26a978fbdd 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -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