]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: Expand buffer size in usb_find_and_bind_driver()
authorMarek Vasut <marex@denx.de>
Sat, 26 Nov 2022 12:57:53 +0000 (13:57 +0100)
committerMarek Vasut <marex@denx.de>
Sun, 27 Nov 2022 11:04:36 +0000 (12:04 +0100)
commit55a95f8f58cf5c884edfe8714bf681cd17ef7242
treefad6e70fb1c7891af9911540f36c6811d52c29ba
parent27c415ae8b743710e412ef408b52894af68141c6
usb: Expand buffer size in usb_find_and_bind_driver()

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@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/usb/host/usb-uclass.c