summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-10-06 21:46:08 -0400
committerSteven Toth <stoth@linuxtv.org>2008-10-06 21:46:08 -0400
commit93c1f76aaf674cc9b7210b6d00bea23137c89958 (patch)
tree9949bbcccb95c240fe79a7e0f335f7683f35c9da /linux/drivers/media/dvb/dvb-core
parent4bfe022c9d8c09b8c4e8a2b429609bd4b73c2fea (diff)
downloadmediapointer-dvb-s2-93c1f76aaf674cc9b7210b6d00bea23137c89958.tar.gz
mediapointer-dvb-s2-93c1f76aaf674cc9b7210b6d00bea23137c89958.tar.bz2
S2API: Return error of the caller provides 0 commands.
From: Steven Toth <stoth@linuxtv.org> S2API: Return error of the caller provides 0 commands. Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 546705d13..43b31ec2c 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1459,7 +1459,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
/* Put an arbitrary limit on the number of messages that can
* be sent at once */
- if (tvps->num > DTV_IOCTL_MAX_MSGS)
+ if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
return -EINVAL;
tvp = (struct dtv_property *) kmalloc(tvps->num *
@@ -1494,7 +1494,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
/* Put an arbitrary limit on the number of messages that can
* be sent at once */
- if (tvps->num > DTV_IOCTL_MAX_MSGS)
+ if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
return -EINVAL;
tvp = (struct dtv_property *) kmalloc(tvps->num *