This is the 2.4 version of that patch I just sent for 2.5,
making sure usbcore doesn't use un-initialized memory for
its language IDs.

- Dave
--- 1.28/drivers/usb/usb.c      Wed Apr  2 08:48:44 2003
+++ edited/drivers/usb/usb.c    Mon Jul  7 15:23:35 2003
@@ -2154,7 +2154,7 @@
                if (err < 0) {
                        err("error getting string descriptor 0 (error=%d)", err);
                        goto errout;
-               } else if (tbuf[0] < 4) {
+               } else if (err < 4 || tbuf[0] < 4) {
                        err("string descriptor 0 too short");
                        err = -EINVAL;
                        goto errout;

Reply via email to