Messages in this thread Patch in this message | | | Date | Tue, 10 Feb 2009 11:00:44 -0800 | From | Greg KH <> | 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));
| |