DM USB: xHCI: Fix an potential array out of range issue.
When usb device numbers reach up to XHCI_MAX_SLOTS. The slot_allocated
array will get out of range. This patch is used to fix this issue.
Acked-by: Yu Wang
@@ -373,7 +373,7 @@ struct pci_xhci_vdev {
struct pci_xhci_dev_emu **devices; /* XHCI[port] = device */
struct pci_xhci_dev_emu **slots; /* slots assigned from 1 */
- bool slot_allocated[XHCI_MAX_SLOTS];
+ bool slot_allocated[XHCI_MAX_SLOTS + 1];
int ndevices;
uint16_t pid;
uint16_t vid;
