FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

LinkBack Thread Tools
Old 11-18-2010, 04:06 PM
Mattia Dongili
Default Input: fix typo in keycode validation supporting large scancodes

BugLink: http://bugs.launchpad.net/bugs/658198

Backported from de391d12500ede13faa7ecadbe900a8de1f76cfa
by Tim Gardner <tim.gardner@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@linux.it>
Tested-by: Norbert Preining <preining@logic.at>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Tim Gardner <tim.gardner@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;


kernel-team mailing list

Thread Tools

All times are GMT. The time now is 10:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org