summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Hector Martin2010-09-28 03:32:44 +0200
committerGravatar Hector Martin2010-09-28 03:32:44 +0200
commite534cc5ce4c7fa42c9314b26d7fa0cf288d39833 (patch)
treeb4451233b7899b30d0d1939eb1c693d8376ce2e3
parent375c07f27e591d3fffcb9b8103e535b0f471182a (diff)
downloadusbmuxd-1.0.6.tar.gz
usbmuxd-1.0.6.tar.bz2
Fix potential issue with USB transactions >=32k multiples of 16kv1.0.6
-rw-r--r--daemon/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/device.c b/daemon/device.c
index 0a143b2..8c786a7 100644
--- a/daemon/device.c
+++ b/daemon/device.c
@@ -576,7 +576,7 @@ void device_data_input(struct usb_device *usbdev, unsigned char *buffer, uint32_
}
memcpy(dev->pktbuf + dev->pktlen, buffer, length);
struct mux_header *mhdr = (struct mux_header *)dev->pktbuf;
- if((length < USB_MRU) || (ntohl(mhdr->length) == length)) {
+ if((length < USB_MRU) || (ntohl(mhdr->length) == (length + dev->pktlen))) {
buffer = dev->pktbuf;
length += dev->pktlen;
dev->pktlen = 0;