diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 15:54:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 15:54:41 -0700 |
commit | 7f93220b624de1b7d9fcff8a2cebd6fce7ed4665 (patch) | |
tree | 5070ec25635008082b47a646d64b4359896c0faa /drivers/input/evdev.c | |
parent | 2b8dfec8c8fa4ba5bc946a602e94e99861462cad (diff) | |
parent | d39969deee4b541be4ee5789a2e4c14511c886e2 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 60b696e9336..3738d173f9a 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -322,7 +322,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; + if (dev->keycodesize < sizeof(v) && (v >> (dev->keycodesize * 8))) return -EINVAL; u = SET_INPUT_KEYCODE(dev, t, v); clear_bit(u, dev->keybit); set_bit(v, dev->keybit); |