lkml.org 
[lkml]   [2008]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usbmon binary format reader loses synchronization
On Thu, 13 Nov 2008 13:59:45 +0100, Ingo van Lil <inguin@gmx.de> wrote:

> +++ b/drivers/usb/mon/mon_bin.c 2008-11-13 11:44:03.000000000 +0100
> @@ -681,7 +681,7 @@
> }
>
> if (rp->b_read >= sizeof(struct mon_bin_hdr)) {
> - step_len = min(nbytes, (size_t)ep->len_cap);
> + step_len = min(nbytes, sizeof(struct mon_bin_hdr) + (size_t)ep->len_cap - rp->b_read);
> offset = rp->b_out + PKT_SIZE;

I cannot tell right away if this is the best fix, but I'll look
into this. Thanks a lot!

-- Pete


\
 
 \ /
  Last update: 2008-11-13 22:51    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site