Re: [PATCH v1 1/1] lsusb: Fix array entry count for variable sized entries.

2017-12-08 Thread Greg KH
On Fri, Dec 08, 2017 at 10:10:56AM +, Michael Drake wrote: > On 07/12/17 20:02, Greg KH wrote: > > On Thu, Dec 07, 2017 at 07:18:39PM +, Michael Drake wrote: > > > This fixes a divide by zero which happened when an array, > > > without an explicit entry count (ultimately calculated from >

Re: [PATCH v1 1/1] lsusb: Fix array entry count for variable sized entries.

2017-12-08 Thread Michael Drake
On 07/12/17 20:02, Greg KH wrote: On Thu, Dec 07, 2017 at 07:18:39PM +, 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

Re: [PATCH v1 1/1] lsusb: Fix array entry count for variable sized entries.

2017-12-07 Thread Greg KH
On Thu, Dec 07, 2017 at 07:18:39PM +, 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

[PATCH v1 1/1] lsusb: Fix array entry count for variable sized entries.

2017-12-07 Thread Michael Drake
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