Search Linux Wireless

Re: [PATCH] wireless: beyond ARRAY_SIZE of intf->crypto_stats

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

 



On Wednesday 20 May 2009, Roel Kluin wrote:
> Do not go beyond ARRAY_SIZE of intf->crypto_stats
> 
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>

I really hope the previous code never resulted in a crash,
since then I would have to look into strange values coming
from the hardware. ;)

Thanks.

Acked-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>

> ---
> diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
> index 07d378e..7b3ee8c 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00debug.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
> @@ -138,7 +138,7 @@ void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
>  
>  	if (cipher == CIPHER_TKIP_NO_MIC)
>  		cipher = CIPHER_TKIP;
> -	if (cipher == CIPHER_NONE || cipher > CIPHER_MAX)
> +	if (cipher == CIPHER_NONE || cipher >= CIPHER_MAX)
>  		return;
>  
>  	/* Remove CIPHER_NONE index */
> --
> 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