diff options
| author | 代码人生 <[email protected]> | 2026-06-26 09:33:32 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-06-26 09:33:32 +0800 |
| commit | 0ec10636b386b27308c68610916e131c7f6ef570 (patch) | |
| tree | b17c243614170da3f886fd80c65dc37fad831ec5 /src/class | |
| parent | 854525d5268669843a9700bee60e5613a5ce945a (diff) | |
| parent | 0a25cc27d7d3699536f6df01e80af3eb0423ce58 (diff) | |
Merge branch 'hathach:master' into fix/dwc2-hcd-ls-hfir
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/msc/msc_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c index 3766e3a25..39dc3a074 100644 --- a/src/class/msc/msc_device.c +++ b/src/class/msc/msc_device.c @@ -545,7 +545,8 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t // Invoke user callback if not built-in if ((resplen < 0) && (p_msc->sense_key == 0)) { - resplen = tud_msc_scsi_cb(p_cbw->lun, p_cbw->command, _mscd_epbuf.buf, (uint16_t)p_msc->total_len); + resplen = tud_msc_scsi_cb(p_cbw->lun, p_cbw->command, _mscd_epbuf.buf, + (uint16_t) tu_min32(p_msc->total_len, CFG_TUD_MSC_EP_BUFSIZE)); } if (resplen < 0) { |
