[PATCH 2/2] HID: corsair: fix control-transfer error handling

2017-01-12 Thread Johan Hovold
Make sure to check for short control transfers in order to avoid parsing uninitialised buffer data and leaking it to user space. Note that the backlight and macro-mode buffer constraints are kept as loose as possible in order to avoid any regressions should the current buffer sizes be larger than

[PATCH 2/2] HID: corsair: fix control-transfer error handling

2017-01-12 Thread Johan Hovold
Make sure to check for short control transfers in order to avoid parsing uninitialised buffer data and leaking it to user space. Note that the backlight and macro-mode buffer constraints are kept as loose as possible in order to avoid any regressions should the current buffer sizes be larger than