Re: [PATCH] HID: core: Correctly handle ReportSize being zero

2020-09-01 Thread Benjamin Tissoires
On Tue, Sep 1, 2020 at 10:14 AM Jiri Kosina wrote: > > On Sat, 29 Aug 2020, Marc Zyngier wrote: > > > It appears that a ReportSize value of zero is legal, even if a bit > > non-sensical. Most of the HID code seems to handle that gracefully, > > except when computing the total size in bytes. When f

Re: [PATCH] HID: core: Correctly handle ReportSize being zero

2020-09-01 Thread Jiri Kosina
On Sat, 29 Aug 2020, Marc Zyngier wrote: > It appears that a ReportSize value of zero is legal, even if a bit > non-sensical. Most of the HID code seems to handle that gracefully, > except when computing the total size in bytes. When fed as input to > memset, this leads to some funky outcomes. >

[PATCH] HID: core: Correctly handle ReportSize being zero

2020-08-29 Thread Marc Zyngier
It appears that a ReportSize value of zero is legal, even if a bit non-sensical. Most of the HID code seems to handle that gracefully, except when computing the total size in bytes. When fed as input to memset, this leads to some funky outcomes. Detect the corner case and correctly compute the siz