Skip to content

Commit

Permalink
Fix potential issue with USB transactions >=32k multiples of 16k
Browse files Browse the repository at this point in the history
  • Loading branch information
marcan committed Sep 28, 2010
1 parent 375c07f commit e534cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e534cc5

Please sign in to comment.