From 70cd0576aa39c55aabd227851cba0c601e811fb6 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 16 Jan 2025 18:05:43 +0200 Subject: usb: hcd: Bump local buffer size in rh_string() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC is not happy about the buffer size: drivers/usb/core/hcd.c:441:48: error: ā€˜%sā€™ directive output may be truncated writing up to 64 bytes into a region of size between 35 and 99 [-Werror=format-truncation=] 441 | snprintf (buf, sizeof buf, "%s %s %s", init_utsname()->sysname, | ^~ 442 | init_utsname()->release, hcd->driver->description); | ~~~~~~~~~~~~~~~~~~~~~~~ Bump the size to get it enough for the possible strings. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250116160543.216913-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 0b2490347b9f..a75cf1f6d741 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -415,7 +415,7 @@ ascii2desc(char const *s, u8 *buf, unsigned len) static unsigned rh_string(int id, struct usb_hcd const *hcd, u8 *data, unsigned len) { - char buf[100]; + char buf[160]; char const *s; static char const langids[4] = {4, USB_DT_STRING, 0x09, 0x04}; -- cgit