Re: [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch already shipped in 2.6.29.

2b190e76def5233c542f6025b4a133b1d4bd1a37
"panasonic-laptop: fix X[ ARRAY_SIZE(X) ]"

thanks,
Len Brown, Intel Open Source Technology Center

On Fri, 22 May 2009, Roel Kluin wrote:

> Do not go beyond ARRAY_SIZE of pcc->keymap
> 
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
> > Presumably you meant to send this to linux-acpi or linux-kernel instead
> > of linux-sh ;-)
> 
> I was not sure, but linux-acpi is cc'ed now.
> 
> diff --git a/drivers/misc/panasonic-laptop.c b/drivers/misc/panasonic-laptop.c
> index 4a1bc64..d82d1cc 100644
> --- a/drivers/misc/panasonic-laptop.c
> +++ b/drivers/misc/panasonic-laptop.c
> @@ -515,7 +515,7 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
>  
>  	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));
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux