ChangeSet 1.1119.3.7, 2003/09/05 15:47:17-07:00, [EMAIL PROTECTED]

[PATCH] USB: fix copy_to_user call in uhci-debug.h


 drivers/usb/host/uhci-debug.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/host/uhci-debug.h b/drivers/usb/host/uhci-debug.h
--- a/drivers/usb/host/uhci-debug.h     Fri Sep  5 17:10:46 2003
+++ b/drivers/usb/host/uhci-debug.h     Fri Sep  5 17:10:46 2003
@@ -545,7 +545,8 @@
        if (!access_ok(VERIFY_WRITE, buf, nbytes))
                return -EINVAL;
 
-       copy_to_user(buf, up->data + pos, nbytes);
+       if (copy_to_user(buf, up->data + pos, nbytes))
+               return -EFAULT;
 
        *ppos += nbytes;
 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to