Please sign in to comment.
HID: i2c-hid: prevent buffer overflow in early IRQ
Before ->start() is called, bufsize size is set to HID_MIN_BUFFER_SIZE, 64 bytes. While processing the IRQ, we were asking to receive up to wMaxInputLength bytes, which can be bigger than 64 bytes. Later, when ->start is run, a proper bufsize will be calculated. Given wMaxInputLength is said to be unreliable in other part of the code, set to receive only what we can even if it results in truncated reports. Signed-off-by: Gwendal Grignou <firstname.lastname@example.org> Reviewed-by: Benjamin Tissoires <email@example.com> Cc: firstname.lastname@example.org Signed-off-by: Jiri Kosina <email@example.com>
- Loading branch information...