Search Linux Wireless

Re: [PATCH 01/13] staging: wilc1000: make use of get_unaligned_le16/le32 to pack data

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

 



On Thu, Jan 17, 2019 at 01:21:10PM +0000, Ajay.Kathat@xxxxxxxxxxxxx wrote:
> From: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx>
> 
> Make use of get_unaligned_le16/le32 framework api's to pack data.
> 
> Signed-off-by: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx>
> ---
>  drivers/staging/wilc1000/host_interface.c | 15 +++------------
>  drivers/staging/wilc1000/wilc_wlan_cfg.c  | 27 +++++++++++++--------------
>  2 files changed, 16 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index c05c120..a718842 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -2154,10 +2154,7 @@ void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length)
>  	struct host_if_drv *hif_drv;
>  	struct wilc_vif *vif;
>  
> -	id = buffer[length - 4];

Not related to this patch, but so far as I can see, length can't be zero
but there is nothing preventing if from being less than four so this
could be reading from buffer[-3].

regards,
dan carpenter





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux