On Thu, Jan 17, 2019 at 01:21:10PM +0000, ajay.kat...@microchip.com wrote:
> From: Ajay Singh <ajay.kat...@microchip.com>
> 
> Make use of get_unaligned_le16/le32 framework api's to pack data.
> 
> Signed-off-by: Ajay Singh <ajay.kat...@microchip.com>
> ---
>  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


_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to