From dbb964d19d93f2840dae601015aec75f3e656e8c Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Sun, 19 Apr 2015 11:12:59 +0000 Subject: Do not truncate possible remaining transfer length. Reported by Takahiro HAYASHI on bugs@, thanks! --- sys/dev/usb/xhci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 774bd87b759..69a61595ec3 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.58 2015/01/21 14:02:33 mpi Exp $ */ +/* $OpenBSD: xhci.c,v 1.59 2015/04/19 11:12:58 mpi Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -714,7 +714,8 @@ xhci_event_xfer(struct xhci_softc *sc, uint64_t paddr, uint32_t status, struct xhci_pipe *xp; struct usbd_xfer *xfer; struct xhci_xfer *xx; - uint8_t dci, slot, code, remain; + uint8_t dci, slot, code; + uint32_t remain; int trb_idx; slot = XHCI_TRB_GET_SLOT(flags); -- cgit v1.2.3