Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 2009 19:59:38 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 169605 for review
Message-ID:  <200910191959.n9JJxc9i006662@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=169605

Change 169605 by hselasky@hselasky_laptop001 on 2009/10/19 19:59:35

	
	LibUSB:
		- clamp timeout variable in user-space aswell as in kernel-space,
		so that large timeouts get the maximum timeout.

Affected files ...

.. //depot/projects/usb/src/lib/libusb/libusb20_ugen20.c#8 edit

Differences ...

==== //depot/projects/usb/src/lib/libusb/libusb20_ugen20.c#8 (text+ko) ====

@@ -800,7 +800,11 @@
 	if (xfer->flags & LIBUSB20_TRANSFER_DO_CLEAR_STALL) {
 		fsep->flags |= USB_FS_FLAG_CLEAR_STALL;
 	}
-	fsep->timeout = xfer->timeout;
+	/* NOTE: The "fsep->timeout" variable is 16-bit. */
+	if (xfer->timeout > 65535)
+		fsep->timeout = 65535;
+	else
+		fsep->timeout = xfer->timeout;
 
 	temp.ep_index = xfer->trIndex;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910191959.n9JJxc9i006662>