diff options
| author | Cynventria[CitRA] <[email protected]> | 2025-03-10 14:22:29 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-03-10 14:22:29 +0800 |
| commit | cf94b3f5fc6efdfc25b7c434852f4b04af2dddc7 (patch) | |
| tree | 88670b6d4b08b818f007e4477e61230630867a13 /src | |
| parent | dc459031619bbb46687b0dacb7d159d8ec626bde (diff) | |
fix desc_end in vendord_open()
minor fix on calculation of desc_end in vendord_open( ) for descriptor prasing
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/vendor/vendor_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/vendor/vendor_device.c b/src/class/vendor/vendor_device.c index 6f9b4853f..2fc0ac944 100644 --- a/src/class/vendor/vendor_device.c +++ b/src/class/vendor/vendor_device.c @@ -197,7 +197,7 @@ void vendord_reset(uint8_t rhport) { uint16_t vendord_open(uint8_t rhport, const tusb_desc_interface_t* desc_itf, uint16_t max_len) { TU_VERIFY(TUSB_CLASS_VENDOR_SPECIFIC == desc_itf->bInterfaceClass, 0); const uint8_t* p_desc = tu_desc_next(desc_itf); - const uint8_t* desc_end = p_desc + max_len; + const uint8_t* desc_end = (uint8_t const*)desc_itf + max_len; // Find available interface vendord_interface_t* p_vendor = NULL; |
