Search Linux Wireless

Re: [PATCH] libertas: Read buffer overflow

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

 



On Sun, 2009-08-02 at 09:44 +0200, Roel Kluin wrote:
> Check whether index is within bounds before testing the element.
> 
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>

Acked-by: Dan Williams <dcbw@xxxxxxxxxx>

> ---
> diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c
> index 9a5408e..5c69681 100644
> --- a/drivers/net/wireless/libertas/11d.c
> +++ b/drivers/net/wireless/libertas/11d.c
> @@ -47,7 +47,7 @@ static u8 lbs_region_2_code(u8 *region)
>  {
>  	u8 i;
>  
> -	for (i = 0; region[i] && i < COUNTRY_CODE_LEN; i++)
> +	for (i = 0; i < COUNTRY_CODE_LEN && region[i]; i++)
>  		region[i] = toupper(region[i]);
>  
>  	for (i = 0; i < ARRAY_SIZE(region_code_mapping); i++) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux