Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60e8615a authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Staging: hv: mousevsc: Handle the case where we may get bogus report desc size



Handle the case where we may get bogus report desc size from the host.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 01584892
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -341,6 +341,8 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,

	/* Save the report desc */
	input_device->report_desc_size = desc->desc[0].wDescriptorLength;
	if (input_device->report_desc_size == 0)
		goto cleanup;
	input_device->report_desc = kzalloc(input_device->report_desc_size,
					  GFP_ATOMIC);