mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Prevent wraparound of the timeout variable.
Submitted by: HPS
This commit is contained in:
parent
62d9857501
commit
0c35eaad3f
1 changed files with 5 additions and 1 deletions
|
|
@ -800,7 +800,11 @@ ugen20_tr_submit(struct libusb20_transfer *xfer)
|
|||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue