From: Pete Zaitcev <zaitcev@redhat.com>
To: Ingo van Lil <inguin@gmx.de>
Cc: linux-kernel@vger.kernel.org, zaitcev@redhat.com
Subject: Re: [PATCH] usbmon binary format reader loses synchronization
Date: Thu, 13 Nov 2008 14:46:36 -0700 [thread overview]
Message-ID: <20081113144636.f1ac7cc0.zaitcev@redhat.com> (raw)
In-Reply-To: <20081113125945.GA10450@zaphod.peppercon.de>
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
next prev parent reply other threads:[~2008-11-13 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 12:59 Ingo van Lil
2008-11-13 21:46 ` Pete Zaitcev [this message]
2008-11-14 5:15 ` Pete Zaitcev
2008-11-14 9:44 ` Ingo van Lil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081113144636.f1ac7cc0.zaitcev@redhat.com \
--to=zaitcev@redhat.com \
--cc=inguin@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome