[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-usb-devel
Subject:    [linux-usb-devel] Re: [PATCH 2.6.15/2.6.16-git] Fix off-by-one for num_values =?utf-8?q?in=09uref=5F
From:       Dmitry Torokhov <dtor_core () ameritech ! net>
Date:       2006-01-31 6:32:02
Message-ID: 200601310132.02803.dtor_core () ameritech ! net
[Download RAW message or body]

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic