We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6fde5e commit d0fac32Copy full SHA for d0fac32
core/usbh_core.c
@@ -486,7 +486,7 @@ int usbh_enumerate(struct usbh_hubport *hport)
486
goto errout;
487
}
488
USB_LOG_INFO("The device has %d interfaces\r\n", ((struct usb_configuration_descriptor *)ep0_request_buffer[hport->bus->busid])->bNumInterfaces);
489
- hport->raw_config_desc = usb_osal_malloc(wTotalLength);
+ hport->raw_config_desc = usb_osal_malloc(wTotalLength + 1);
490
if (hport->raw_config_desc == NULL) {
491
ret = -USB_ERR_NOMEM;
492
USB_LOG_ERR("No memory to alloc for raw_config_desc\r\n");
0 commit comments