lkml.org 
[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 30/53] panasonic-laptop: fix X[ ARRAY_SIZE(X) ]
2.6.28-stable review patch.  If anyone has any objections, please let us know.
------------------

From: Roel Kluin <roel.kluin@gmail.com>

commit 2b190e76def5233c542f6025b4a133b1d4bd1a37 upstream.

Ensure pcc->keymap[ ARRAY_SIZE(pcc->keymap) ] does not occur.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/misc/panasonic-laptop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/misc/panasonic-laptop.c
+++ b/drivers/misc/panasonic-laptop.c
@@ -515,7 +515,7 @@ static void acpi_pcc_generate_keyinput(s

hkey_num = result & 0xf;

- if (hkey_num < 0 || hkey_num > ARRAY_SIZE(pcc->keymap)) {
+ if (hkey_num < 0 || hkey_num >= ARRAY_SIZE(pcc->keymap)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"hotkey number out of range: %d\n",
hkey_num));


\
 
 \ /
  Last update: 2009-02-10 20:19    [W:0.169 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site