Commit aa98ad44 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: rio500.c bugfix

patch from Silvio Cesare to fix signed problem.
parent 831fdda6
......@@ -146,7 +146,7 @@ ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd,
retval = -EFAULT;
goto err_out;
}
if (rio_cmd.length > PAGE_SIZE) {
if (rio_cmd.length < 0 || rio_cmd.length > PAGE_SIZE) {
retval = -EINVAL;
goto err_out;
}
......@@ -216,7 +216,7 @@ ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd,
retval = -EFAULT;
goto err_out;
}
if (rio_cmd.length > PAGE_SIZE) {
if (rio_cmd.length < 0 || rio_cmd.length > PAGE_SIZE) {
retval = -EINVAL;
goto err_out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment