From: Greg KH <greg@kroah.com>
To: Michael Drake <michael.drake@codethink.co.uk>
Cc: linux-usb@vger.kernel.org
Subject: [v1,1/1] lsusb: Fix array entry count for variable sized entries.
Date: Fri, 8 Dec 2017 11:22:20 +0100 [thread overview]
Message-ID: <20171208102220.GC16245@kroah.com> (raw)
On Fri, Dec 08, 2017 at 10:10:56AM +0000, Michael Drake wrote:
> On 07/12/17 20:02, Greg KH wrote:
> > On Thu, Dec 07, 2017 at 07:18:39PM +0000, Michael Drake wrote:
> > > This fixes a divide by zero which happened when an array,
> > > without an explicit entry count (ultimately calculated from
> > > the value in the descriptor data's bLength field) was used
> > > on field with a variable size.
> > >
> > > The solultion is to use the get_entry_size() function on
> > > the array entry, which can get the entry size from a
> > > referenced field.
> > >
> > > Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
> > > ---
> > > desc-dump.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Nice, that fixed the problem, thanks.
>
> Great, thanks Greg!
>
> > Now applied and pushed out.
>
> I can't see this commit yet on
>
> https://github.com/gregkh/usbutils/commits/master
Oops, forgot to sync my laptop, it's there now.
greg k-h
---
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
next reply other threads:[~2017-12-08 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 10:22 Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-08 10:10 [v1,1/1] lsusb: Fix array entry count for variable sized entries Michael Drake
2017-12-07 20:02 Greg KH
2017-12-07 19:18 Michael Drake
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=20171208102220.GC16245@kroah.com \
--to=greg@kroah.com \
--cc=linux-usb@vger.kernel.org \
--cc=michael.drake@codethink.co.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).