| Index: components/usb_service/usb_device_handle.cc
|
| diff --git a/components/usb_service/usb_device_handle.cc b/components/usb_service/usb_device_handle.cc
|
| index e9b9fcce7df75a4c1ba04854adb734459c32a8a9..b341368955649560207665ce7148cdee61ff9fb9 100644
|
| --- a/components/usb_service/usb_device_handle.cc
|
| +++ b/components/usb_service/usb_device_handle.cc
|
| @@ -234,8 +234,7 @@ void UsbDeviceHandle::TransferComplete(PlatformUsbTransferHandle handle) {
|
| CHECK(transfer.length >= LIBUSB_CONTROL_SETUP_SIZE)
|
| << "buffer was not correctly set: too small for the control header";
|
|
|
| - if (transfer.length >= actual_length &&
|
| - actual_length >= LIBUSB_CONTROL_SETUP_SIZE) {
|
| + if (transfer.length >= (LIBUSB_CONTROL_SETUP_SIZE + actual_length)) {
|
| // If the payload is zero bytes long, pad out the allocated buffer
|
| // size to one byte so that an IOBuffer of that size can be allocated.
|
| scoped_refptr<net::IOBuffer> resized_buffer =
|
|
|