Re: [PATCH] fix X[ ARRAY_SIZE(X) ]

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

 



applied

thanks,
--
Len Brown, Intel Open Source Technology Center

On Sat, 17 Jan 2009, Roel Kluin wrote:

> Ensure pcc->keymap[ ARRAY_SIZE(pcc->keymap) ] does not occur.
> 
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
> diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
> index f30db36..c47a44d 100644
> --- a/drivers/platform/x86/panasonic-laptop.c
> +++ b/drivers/platform/x86/panasonic-laptop.c
> @@ -507,7 +507,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