Commit Graph

4 Commits

Author SHA1 Message Date
Ryzee119 453ba529a6 OHCI: Fix array out of bounds issue
If using a USB hub, a request outside the array size can occur

Original line:
https://github.com/hathach/tinyusb/blob/ffb257ac17f162bc5a4c26596d7a1e954db98aa5/src/portable/ohci/ohci.h#L162

It can happen in a few places but one such example is here:
https://github.com/hathach/tinyusb/blob/ffb257ac17f162bc5a4c26596d7a1e954db98aa5/src/portable/ohci/ohci.c#L460

ie. if HUB address is 5, this would be an array index out of bounds on control endpoints as `CFG_TUH_DEVICE_MAX+1` is only 5.

This fix just includes num of hubs in the reserve array size.

Fixing locally fixed this issue.
2022-01-28 14:02:34 +10:30
hathach 6a16f6ccdd rename CFG_TUSB_HOST_DEVICE_MAX to CFG_TUH_DEVICE_MAX 2021-08-23 11:01:40 +07:00
hathach 31077f48d2 correct ohci endpoint address in xfer complete 2021-05-31 18:16:07 +07:00
hathach 451650fa32 move ehci and ohci to portable folder 2021-02-23 23:09:48 +07:00