tinyusb icon indicating copy to clipboard operation
tinyusb copied to clipboard

stm32_fsdev: off-by-one errors in PMA allocation

Open pigrew opened this issue 3 years ago • 0 comments

Operating System

Windows 10

Board

STM32L053 nucleo

Firmware

fd5bb6e5db8e8e997d66775e689cc73f149e7fc1

What happened ?

stm32_fsdev dcd_pma_alloc causes an off-by-one error when the max packet length is not an even multiple of PMA blocks (2 bytes or 32 bytes), causing one word to be allocated for multiple endpoints.

How to reproduce ?

Define an interrupt endpoint with an odd number of bytes, along with a second endpoint which is opened after the first.

Debug Log as txt file

No response

Screenshots

No response

pigrew avatar Jul 30 '22 22:07 pigrew