[PATCH 3/3] staging: wilc1000: refactor p2p action frames handling API's
Dan Carpenter
dan.carpenter at oracle.com
Tue Feb 11 06:58:56 UTC 2020
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 at 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
More information about the devel
mailing list