Home
last modified time | relevance | path

Searched hist:bce1305c0ece3dc549663605e567655dd701752c (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/hid/
H A Dhid-core.cdiff bce1305c0ece3dc549663605e567655dd701752c Sat Aug 29 06:26:01 CDT 2020 Marc Zyngier <maz@kernel.org> HID: core: Correctly handle ReportSize being zero

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 size.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>