summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2002-07-22 02:23:55 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2002-07-22 02:23:55 -0700
commitaa98ad44dcc75311eb7972ebf4bb86a7911278de (patch)
tree8c2813be42382be55c7c38b892c5a40cc6fb089e
parent831fdda6645f85c12af0d2b494410576ecbc1939 (diff)
[PATCH] USB: rio500.c bugfix
patch from Silvio Cesare to fix signed problem.
-rw-r--r--drivers/usb/misc/rio500.c4
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;
}