Search Linux Wireless

Re: [PATCH] libertas: Read buffer overflow

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

 



> -	size_t num_card_rates = sizeof(lbs_bg_rates);
> +	size_t num_card_rates = ARRAY_SIZE(lbs_bg_rates);

Hmm, not sure about this.  First I don't know if we need a 
variable for this at all. Can't you simply use ARRAY_SIZE() 
whenever it's needed?

If you want to keep num_card_rates, you should change it's 
type. "size_t" is normally used to denote sizes in bytes, e.g. 
it's the type for the length of malloc and friends. But now the 
variable holds a number of elements and should be int or 
unsigned int.

-- 
http://www.holgerschurig.de
--
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