All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ajay.Kathat@microchip.com
Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
	gregkh@linuxfoundation.org, johannes@sipsolutions.net,
	Adham.Abozaeid@microchip.com
Subject: Re: [PATCH 01/13] staging: wilc1000: make use of get_unaligned_le16/le32 to pack data
Date: Mon, 21 Jan 2019 16:14:01 +0300	[thread overview]
Message-ID: <20190121131401.GG4482@kadam> (raw)
In-Reply-To: <1547731250-18518-2-git-send-email-ajay.kathat@microchip.com>

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



  reply	other threads:[~2019-01-21 13:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 13:21 [PATCH 00/13] staging: wilc1000: address few mainline review Ajay.Kathat
2019-01-17 13:21 ` [PATCH 01/13] staging: wilc1000: make use of get_unaligned_le16/le32 to pack data Ajay.Kathat
2019-01-21 13:14   ` Dan Carpenter [this message]
2019-01-17 13:21 ` [PATCH 02/13] staging: wilc1000: refactor wilc_wlan_set_bssid() Ajay.Kathat
2019-01-17 13:21 ` [PATCH 03/13] staging: wilc1000: use 'struct' to pack cfg header frame in wilc_wlan_cfg_commit() Ajay.Kathat
2019-01-17 13:21 ` [PATCH 04/13] staging: wilc1000: remove the use of scan shadow buffer Ajay.Kathat
2019-01-17 13:21 ` [PATCH 05/13] staging: wilc1000: make use of cfg80211_inform_bss_frame() Ajay.Kathat
2019-01-17 13:21 ` [PATCH 06/13] staging: wilc1000: corrected order to pack join param buffer Ajay.Kathat
2019-01-17 13:21 ` [PATCH 07/13] staging: wilc1000: use struct to pack join parameters for FW Ajay.Kathat
2019-01-17 13:21 ` [PATCH 08/13] staging: wilc1000: rename hidden_network related data structure Ajay.Kathat
2019-01-17 13:21 ` [PATCH 09/13] staging: wilc1000: use single struct for 'connect' related parameters Ajay.Kathat
2019-01-17 13:21 ` [PATCH 10/13] staging: wilc1000: refactor information message parsing logic Ajay.Kathat
2019-01-17 13:21 ` [PATCH 11/13] staging: wilc1000: remove 'disconnect_info' structure Ajay.Kathat
2019-01-17 13:21 ` [PATCH 12/13] staging: wilc1000: refactor handle_set_mcast_filter() Ajay.Kathat
2019-01-17 13:21 ` [PATCH 13/13] staging: wilc1000: avoid the use of typedef for function pointers Ajay.Kathat
2019-01-18  9:41 ` [PATCH 00/13] staging: wilc1000: address few mainline review Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190121131401.GG4482@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=Adham.Abozaeid@microchip.com \
    --cc=Ajay.Kathat@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.