diff options
| -rw-r--r-- | drivers/usb/misc/rio500.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c index 70388454d8f5..1c8731d1df5f 100644 --- a/drivers/usb/misc/rio500.c +++ b/drivers/usb/misc/rio500.c @@ -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; } |
