Re: [PATCH 2/4] HID: corsair-void: fix out-of-bounds read in corsair_void_raw_event
From: Stuart Hayhurst
Date: Fri Jul 17 2026 - 18:55:27 EST
Hi,
Looking through this, I had a couple thoughts:
- It should send a warning for unexpected sizes, since most likely it's a format we haven't seen yet
- 5 is a bit of a magic number, especially as some packets of other sizes pass through, but we don't do anything with them (yet?)
- AFAIK returning 0 indicates everything was OK, when actually we bailed out. By convention, shouldn't this return 1 on failure?
The patch I submitted a few weeks ago handled these: https://lore.kernel.org/all/20260630010656.626157-3-stuart.a.hayhurst@xxxxxxxxx/
Stuart