On Sat, 14 Apr 2007 12:55:43 -0400 (EDT), Alan Stern <[EMAIL PROTECTED]> wrote:
> +     frame_number = usb_get_current_frame_number(ps->dev);
> +     if (put_user(frame_number, (int __user *)arg))
> +             return -EFAULT;
> +     return 0;

I think it would be safer to test frame_number for being negative and
return the error in errno rather than the frame number.

-- Pete

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to