]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
usb: gadget: g_dnl: hold maximum string descriptor
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 22 Feb 2017 15:12:39 +0000 (17:12 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 14 Apr 2017 14:44:16 +0000 (16:44 +0200)
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 <felipe.balbi@linux.intel.com>
drivers/usb/gadget/g_dnl.c

index 4ba7c1da7cb0b4ba670a76a80d5689ced3132ad4..fcedb554c4c6bbc1c3009a3b0f17e72188356c04 100644 (file)
@@ -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