mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 10:36:04 +08:00
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 <dillon.minfei@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user