Re: [PATCH] usb: gadget: f_uvc: fix Extension Unit descriptor heap overflow
From: Randy Dunlap
Date: Sat Aug 22 2026 - 16:03:03 EST
On 8/22/26 12:47 PM, Haofeng Li wrote:
> +/* The descriptor must fit into the one-byte bLength field */
descriptor length must fit
?
> +static int uvcg_extension_check_size(u8 nr_in_pins, u8 control_size)
> +{
> + if (UVC_DT_EXTENSION_UNIT_SIZE(nr_in_pins, control_size) > 255)
> + return -EINVAL;
> +
> + return 0;
> +}
--
~Randy