diff options
| author | Dillon Min <[email protected]> | 2021-03-11 17:31:35 +0800 |
|---|---|---|
| committer | Dillon Min <[email protected]> | 2021-03-12 16:30:39 +0800 |
| commit | 9789e4c930fc1b3869f75a36e481a0c17e341d6a (patch) | |
| tree | c7610885652de0af94dc210ab201f524956dd52b /components | |
| parent | effcee25b7cbb2bb42d4134d37dc8a9ec4635130 (diff) | |
component: driver: usb: enlarge uconfig_descriptor's data array space
if you add more compositive usb device(more than 4), the data[256]
can't hold all the devices's config information, array out of bounds.
Fixes: 60c27fc4b ("add USB composite and mass storage class features in USB device stack")
Signed-off-by: Dillon Min <[email protected]>
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/include/drivers/usb_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/include/drivers/usb_common.h b/components/drivers/include/drivers/usb_common.h index 4d85a85e35..a6c73c5601 100644 --- a/components/drivers/include/drivers/usb_common.h +++ b/components/drivers/include/drivers/usb_common.h @@ -112,7 +112,7 @@ extern "C" { #define USB_STRING_CONFIG_INDEX 0x04 #define USB_STRING_INTERFACE_INDEX 0x05 #define USB_STRING_OS_INDEX 0x06 -#define USB_STRING_MAX USB_STRING_OS_INDEX +#define USB_STRING_MAX 0xff #define USB_STRING_OS "MSFT100A" @@ -301,7 +301,7 @@ struct uconfig_descriptor rt_uint8_t iConfiguration; rt_uint8_t bmAttributes; rt_uint8_t MaxPower; - rt_uint8_t data[256]; + rt_uint8_t data[2048]; }; typedef struct uconfig_descriptor* ucfg_desc_t; |
