mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-03 07:21:36 +00:00
Merge pull request #1937 from silvergasp/fix_wrong_size
fix: Fix wrong destsz used with tu_memcpy_s
This commit is contained in:
commit
a83cef5e4c
@ -2290,7 +2290,7 @@ bool tud_audio_buffer_and_schedule_control_xfer(uint8_t rhport, tusb_control_req
|
|||||||
if (len > _audiod_fct[func_id].ctrl_buf_sz) len = _audiod_fct[func_id].ctrl_buf_sz;
|
if (len > _audiod_fct[func_id].ctrl_buf_sz) len = _audiod_fct[func_id].ctrl_buf_sz;
|
||||||
|
|
||||||
// Copy into buffer
|
// Copy into buffer
|
||||||
TU_VERIFY(0 == tu_memcpy_s(_audiod_fct[func_id].ctrl_buf, sizeof(_audiod_fct[func_id].ctrl_buf), data, (size_t)len));
|
TU_VERIFY(0 == tu_memcpy_s(_audiod_fct[func_id].ctrl_buf, _audiod_fct[func_id].ctrl_buf_sz, data, (size_t)len));
|
||||||
|
|
||||||
// Schedule transmit
|
// Schedule transmit
|
||||||
return tud_control_xfer(rhport, p_request, (void*)_audiod_fct[func_id].ctrl_buf, len);
|
return tud_control_xfer(rhport, p_request, (void*)_audiod_fct[func_id].ctrl_buf, len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user