Messages in this thread Patch in this message | | | Date | Mon, 14 Jun 2004 06:32:18 -0700 (PDT) | From | John Carlson <> | Subject | [PATCH] Usb gadget drivers 2.4 kernel |
| |
While developing a gadget driver for the 2.4 kernel, I discovered this error in the gadget driver. This bug has been present since the gadget driver was back ported from the 2.6 kernel.
diff -urN linux-2.4.27-pre5/drivers/usb/gadget/config.c linux-2.4.27-test/drivers/usb/gadget/config.c --- linux-2.4.27-pre5/drivers/usb/gadget/config.c 2004-06-14 09:06:48.000000000 -0400 +++ linux-2.4.27-test/drivers/usb/gadget/config.c 2004-06-14 09:13:02.000000000 -0400 @@ -51,7 +51,7 @@ for (; 0 != *src; src++) { unsigned len = (*src)->bLength; - if (len > buflen); + if (len > buflen) return -EINVAL; memcpy(dest, *src, len); buflen -= len;
John Carlson <carlsonj@lexmark.com>
__________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |