Skip to content

Commit

Permalink
[xhci] Avoid accessing beyond end of endpoint context array
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Mar 21, 2017
1 parent 501fa53 commit 6124c0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/usb/xhci.c
Expand Up @@ -1558,7 +1558,7 @@ static void xhci_transfer ( struct xhci_device *xhci,
}

/* Identify endpoint */
if ( ( trb->endpoint > XHCI_CTX_END ) ||
if ( ( trb->endpoint >= XHCI_CTX_END ) ||
( ( endpoint = slot->endpoint[trb->endpoint] ) == NULL ) ) {
DBGC ( xhci, "XHCI %s slot %d transfer event invalid epid "
"%d:\n", xhci->name, slot->id, trb->endpoint );
Expand Down

0 comments on commit 6124c0e

Please sign in to comment.