fix(usb/host): Do not call heap_caps_get_allocated_size() in USB host driver

It causes heap corruption if heap poisoning is enabled on ESP32-P4.
It returns incorrect size on ESP32-S3.

Closes https://github.com/espressif/esp-idf/issues/15815
This commit is contained in:
Tomas Rezucha
2025-04-23 08:42:17 +02:00
committed by BOT
parent 8344af1f09
commit 6badd2cf25
6 changed files with 47 additions and 21 deletions
+1
View File
@@ -569,6 +569,7 @@ esp_err_t usb_host_endpoint_clear(usb_device_handle_t dev_hdl, uint8_t bEndpoint
*
* - This function allocates a transfer object
* - Each transfer object has a fixed sized buffer specified on allocation
* - The resulting data_buffer_size can be bigger that the requested size. This is to ensure that the data buffer is cache aligned
* - A transfer object can be re-used indefinitely
* - A transfer can be submitted using usb_host_transfer_submit() or usb_host_transfer_submit_control()
*