Minor fix.

Since in this case the setup packet precedes the buffer, the size check is off
by 8.

--- linux-2.4.4/drivers/usb.orig/devio.c        Wed May  9 08:38:12 2001
+++ linux-2.4.4/drivers/usb/devio.c     Wed May  9 08:29:42 2001
@@ -780,8 +780,8 @@
                        if ((ep_desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != 
USB_ENDPOINT_XFER_CONTROL)
                                return -EINVAL;
                }
-               /* min 8 byte setup packet, max arbitrary */
-               if (uurb.buffer_length < 8 || uurb.buffer_length > PAGE_SIZE)
+               /* min 8 byte setup packet, max arbitrary + setup packet */
+               if (uurb.buffer_length < 8 || uurb.buffer_length > PAGE_SIZE + 8)
                        return -EINVAL;
                if (!(dr = kmalloc(sizeof(devrequest), GFP_KERNEL)))
                        return -ENOMEM;

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to