summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-04-19 11:12:58 +0000
committermpi <mpi@openbsd.org>2015-04-19 11:12:58 +0000
commit2793cdfd828da6ee538afb20339bdcda4399f62b (patch)
tree1c7542af6a32a38d38906977e94abf578f2b410f
parentRemove reference to oss audio emulation, (diff)
downloadwireguard-openbsd-2793cdfd828da6ee538afb20339bdcda4399f62b.tar.xz
wireguard-openbsd-2793cdfd828da6ee538afb20339bdcda4399f62b.zip
Do not truncate possible remaining transfer length.
Reported by Takahiro HAYASHI on bugs@, thanks!
-rw-r--r--sys/dev/usb/xhci.c5
1 files changed, 3 insertions, 2 deletions
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);