From: Felipe Balbi Date: Wed, 22 Feb 2017 15:12:39 +0000 (+0200) Subject: usb: gadget: g_dnl: hold maximum string descriptor X-Git-Tag: v2017.05-rc2~5^2~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=12d0b8f5f07b76d7447d60f7528d578233553909;p=u-boot usb: gadget: g_dnl: hold maximum string descriptor A USB String descriptor can be up to 255 characters long and it's not NULL terminated according to the USB spec. This means our MAX_STRING_SERIAL should be 256 (to cope with NULL terminator). Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index 4ba7c1da7c..fcedb554c4 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -36,7 +36,7 @@ #define STRING_USBDOWN 2 /* Index of String serial */ #define STRING_SERIAL 3 -#define MAX_STRING_SERIAL 32 +#define MAX_STRING_SERIAL 256 /* Number of supported configurations */ #define CONFIGURATION_NUMBER 1