aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/evdev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 09:48:34 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 09:48:34 -0700
commite0d7ff168a71299919f01500b3d507aae0c67513 (patch)
treede2a7807ec5642e7389191e66d8c5d6d1249096a /drivers/input/evdev.c
parentca49a601c2b4b74e5cf57fef62122204d1982372 (diff)
parent33fdfa97f2b3aab698ef849ec50dcc5102017f0a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r--drivers/input/evdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 374f404e81d..20e3a165989 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -320,6 +320,7 @@ static long evdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (t < 0 || t >= dev->keycodemax || !dev->keycodesize) return -EINVAL;
if (get_user(v, ip + 1)) return -EFAULT;
if (v < 0 || v > KEY_MAX) return -EINVAL;
+ if (v >> (dev->keycodesize * 8)) return -EINVAL;
u = SET_INPUT_KEYCODE(dev, t, v);
clear_bit(u, dev->keybit);
set_bit(v, dev->keybit);