diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-02-22 17:12:39 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2017-04-14 16:44:16 +0200 |
commit | 12d0b8f5f07b76d7447d60f7528d578233553909 (patch) | |
tree | cec0448effa0dcc4b741e8bcd00eccb06bdfb40f /drivers/usb/gadget | |
parent | 5c73536738e1aa411b127d84dff41a5e60a4e610 (diff) |
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 <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/g_dnl.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |