All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ajay.Kathat@microchip.com
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	johannes@sipsolutions.net, linux-wireless@vger.kernel.org,
	Adham.Abozaeid@microchip.com
Subject: Re: [PATCH 3/3] staging: wilc1000: refactor p2p action frames handling API's
Date: Tue, 11 Feb 2020 09:58:56 +0300	[thread overview]
Message-ID: <20200211065856.GD1778@kadam> (raw)
In-Reply-To: <20200211065101.GC1778@kadam>

On Tue, Feb 11, 2020 at 09:51:01AM +0300, Dan Carpenter wrote:
> On Mon, Feb 10, 2020 at 06:36:01PM +0000, Ajay.Kathat@microchip.com wrote:
> > +	if (sta_ch == WILC_INVALID_CHANNEL)
> > +		return;
> >  
> >  	while (index < len) {
> 
> This range checking was there in the original code, but it's not
> correct.  index and len are in terms of bytes so we know that we can
> read one byte from &buf[index] but we are reading a wilc_attr_entry
> struct which is larger than a type.  The struct is actually flexibly
                                ^^^^
I meant byte.

regards,
dan carpenter

  reply	other threads:[~2020-02-11  6:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 18:35 [PATCH 1/3] staging: wilc1000: remove use of vendor specific IE for p2p handling Ajay.Kathat
2020-02-10 18:35 ` [PATCH 2/3] staging: wilc1000: directly fetch 'priv' handler from 'vif' instance Ajay.Kathat
2020-02-10 18:36 ` [PATCH 3/3] staging: wilc1000: refactor p2p action frames handling API's Ajay.Kathat
2020-02-11  6:51   ` Dan Carpenter
2020-02-11  6:58     ` Dan Carpenter [this message]
2020-02-11  9:28     ` Ajay.Kathat

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=20200211065856.GD1778@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.