Since ctrl is copied in from userspace, ctrl.data cannot safely be
dereferenced. Let me know if you have any questions or if I've made
a mistake.
Best,
Rob
--- linux-2.6.7-rc3-full/drivers/usb/core/devio.c.orig Wed Jun 9 12:50:34 2004
+++ linux-2.6.7-rc3-full/drivers/usb/core/devio.c Wed Jun 9 12:49:50 2004
@@ -558,7 +558,7 @@ static int proc_control(struct dev_state
if (usbfs_snoop) {
dev_info(&dev->dev, "control read: data ");
for (j = 0; j < ctrl.wLength; ++j)
- printk ("%02x ", (unsigned char)((char
*)ctrl.data)[j]);
+ printk ("%02x ", (unsigned char)(tbuf)[j]);
printk("\n");
}
if (copy_to_user(ctrl.data, tbuf, ctrl.wLength)) {
@@ -578,7 +578,7 @@ static int proc_control(struct dev_state
if (usbfs_snoop) {
dev_info(&dev->dev, "control write: data: ");
for (j = 0; j < ctrl.wLength; ++j)
- printk ("%02x ", (unsigned char)((char
*)ctrl.data)[j]);
+ printk ("%02x ", (unsigned char)(tbuf)[j]);
printk("\n");
}
i = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ctrl.bRequest,
ctrl.bRequestType,
-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel