[PATCH] usb: Expand buffer size in usb_find_and_bind_driver()

Simon Glass sjg at chromium.org
Sun Nov 27 15:35:56 CET 2022


On Sun, 27 Nov 2022 at 01:58, Marek Vasut <marex at denx.de> wrote:
>
> The "generic_bus_%x_dev_%x" string which is printed into this buffer
> can be up to 34 characters long ("generic_bus_12345678_dev_12345678").
> The buffer would be clipped by snprintf() if both %x were at maximum
> range. Make sure the buffer is long enough to cover such possibility.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> ---
> Cc: Sean Anderson <sean.anderson at seco.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
>  drivers/usb/host/usb-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list