From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Ben Collins <bcollins@ubuntu.com>
Cc: linux-kernel@vger.kernel.org,
linux-usb-devel@lists.sourceforge.net, vojtech@suse.cz
Subject: Re: [PATCH 2.6.15/2.6.16-git] Fix off-by-one for num_values in uref_multi requests
Date: Tue, 31 Jan 2006 01:32:02 -0500 [thread overview]
Message-ID: <200601310132.02803.dtor_core@ameritech.net> (raw)
In-Reply-To: <1138638276.4456.121.camel@grayson>
On Monday 30 January 2006 11:24, Ben Collins wrote:
> Found this when working with a HAPP UGCI device. It has a usage with 7
> indexes. I could read them all one at a time, but using a multiref it
> would only allow me to read the first 6. The patch below fixed it.
>
> Signed-off-by: Ben Collins <bcollins@ubuntu.com>
>
I applied this to the input tree, thanks!
> --- a/drivers/usb/input/hiddev.c
> +++ b/drivers/usb/input/hiddev.c
> @@ -632,7 +632,7 @@ static int hiddev_ioctl(struct inode *in
>
> else if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&
> (uref_multi->num_values > HID_MAX_MULTI_USAGES ||
> - uref->usage_index + uref_multi->num_values >= field->report_count))
> + uref->usage_index + uref_multi->num_values > field->report_count))
> goto inval;
> }
>
>
--
Dmitry
prev parent reply other threads:[~2006-01-31 6:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 16:24 [PATCH 2.6.15/2.6.16-git] Fix off-by-one for num_values in uref_multi requests Ben Collins
2006-01-31 6:32 ` Dmitry Torokhov [this message]
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=200601310132.02803.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=bcollins@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=vojtech@suse.cz \
/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