Skip to content

Commit

Permalink
HID: uhid: Over-ride the default maximum data buffer value with our own
Browse files Browse the repository at this point in the history
The default maximum data buffer size for this interface is UHID_DATA_MAX
(4k).  When data buffers are being processed, ensure this value is used
when ensuring the sanity, rather than a value between the user provided
value and HID_MAX_BUFFER_SIZE (16k).

Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Lee Jones authored and Jiri Kosina committed Feb 23, 2023
1 parent b1a37ed commit 1c5d422
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hid/uhid.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ static const struct hid_ll_driver uhid_hid_driver = {
.parse = uhid_hid_parse,
.raw_request = uhid_hid_raw_request,
.output_report = uhid_hid_output_report,
.max_buffer_size = UHID_DATA_MAX,
};

#ifdef CONFIG_COMPAT
Expand Down

0 comments on commit 1c5d422

Please sign in to comment.