We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent facdbdf commit a6e9c39Copy full SHA for a6e9c39
drivers/hid/hid-cougar.c
@@ -106,7 +106,7 @@ static void cougar_fix_g6_mapping(void)
106
static __u8 *cougar_report_fixup(struct hid_device *hdev, __u8 *rdesc,
107
unsigned int *rsize)
108
{
109
- if (rdesc[2] == 0x09 && rdesc[3] == 0x02 &&
+ if (*rsize >= 117 && rdesc[2] == 0x09 && rdesc[3] == 0x02 &&
110
(rdesc[115] | rdesc[116] << 8) >= HID_MAX_USAGES) {
111
hid_info(hdev,
112
"usage count exceeds max: fixing up report descriptor\n");
0 commit comments