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: Thu, 7 Dec 2017 21:02:33 +0100 [thread overview]
Message-ID: <20171207200233.GA19820@kroah.com> (raw)
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.
Now applied and pushed out.
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-07 20:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 20:02 Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-08 10:22 [v1,1/1] lsusb: Fix array entry count for variable sized entries Greg KH
2017-12-08 10:10 Michael Drake
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=20171207200233.GA19820@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 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.