Maverick SRU, Input: fix typo in keycode validation supporting large scancodes
Tim Gardner
timg at tpi.com
Fri Jan 28 18:55:02 UTC 2011
The following changes since commit ae86ab8935c91281dac1ab943f0ca353bc68ed79:
Mattia Dongili (1):
Input: fix typo in keycode validation supporting large scancodes
are available in the git repository at:
git://kernel.ubuntu.com/rtg/ubuntu-maverick.git vaio-backlight-lp658198
>From ae86ab8935c91281dac1ab943f0ca353bc68ed79 Mon Sep 17 00:00:00 2001
From: Mattia Dongili <malattia at linux.it>
Date: Thu, 18 Nov 2010 09:06:43 -0800
Subject: [PATCH] Input: fix typo in keycode validation supporting large scancodes
BugLink: http://bugs.launchpad.net/bugs/658198
Backported from de391d12500ede13faa7ecadbe900a8de1f76cfa
by Tim Gardner <tim.gardner at canonical.com>
Check the input_keymap_entry keycode size (u32) instead of the device's
(void*) when validating that keycode value can be stored in the keymap.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722
Signed-off-by: Mattia Dongili <malattia at linux.it>
Tested-by: Norbert Preining <preining at logic.at>
Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
drivers/input/input.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/input.c b/drivers/input/input.c
index e6395bf..577a40a 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -681,7 +681,7 @@ static int input_default_setkeycode(struct input_dev *dev,
if (!dev->keycodesize)
return -EINVAL;
- if (dev->keycodesize < sizeof(dev->keycode) &&
+ if (dev->keycodesize < sizeof(kt_entry->keycode) &&
(kt_entry->keycode >> (dev->keycodesize * 8)))
return -EINVAL;
--
1.7.0.4
More information about the kernel-team
mailing list