All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Liu <b-liu@ti.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] usb: musb: gadget: misplaced out of bounds check
Date: Tue, 20 Mar 2018 13:55:55 -0500	[thread overview]
Message-ID: <20180320185555.GY14921@uda0271908> (raw)
In-Reply-To: <20180320184248.11962-1-xypron.glpk@gmx.de>

Hi,

On Tue, Mar 20, 2018 at 07:42:48PM +0100, Heinrich Schuchardt wrote:
> musb->endpoints[] has array size MUSB_C_NUM_EPS.
> We must check array bounds before accessing the array and not afterwards.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> v3
> 	Remove superfluous braces.
> v2
> 	Only the 4 low bits of epnum are relevant for indexing.
> ---
>  drivers/usb/musb/musb_gadget_ep0.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)


Applied. Thanks.

Regards,
-Bin.

WARNING: multiple messages have this Message-ID (diff)
From: Bin Liu <b-liu@ti.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [v3,1/1] usb: musb: gadget: misplaced out of bounds check
Date: Tue, 20 Mar 2018 13:55:55 -0500	[thread overview]
Message-ID: <20180320185555.GY14921@uda0271908> (raw)

Hi,

On Tue, Mar 20, 2018 at 07:42:48PM +0100, Heinrich Schuchardt wrote:
> musb->endpoints[] has array size MUSB_C_NUM_EPS.
> We must check array bounds before accessing the array and not afterwards.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> v3
> 	Remove superfluous braces.
> v2
> 	Only the 4 low bits of epnum are relevant for indexing.
> ---
>  drivers/usb/musb/musb_gadget_ep0.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)


Applied. Thanks.

Regards,
-Bin.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-03-20 18:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 18:42 [PATCH v3 1/1] usb: musb: gadget: misplaced out of bounds check Heinrich Schuchardt
2018-03-20 18:42 ` [v3,1/1] " Heinrich Schuchardt
2018-03-20 18:55 ` Bin Liu [this message]
2018-03-20 18:55   ` Bin Liu

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=20180320185555.GY14921@uda0271908 \
    --to=b-liu@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=xypron.glpk@gmx.de \
    /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.