summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-10-07 01:46:08 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-13 14:28:21 (GMT)
commit6068f5063850984fe6c2490bc8384a7afa2728dc (patch)
tree7c7be063386d1aec8c3620f8d369b43f3826b066 /drivers/media
parentef526f4246f566370218bb6e639f7549244ca5a2 (diff)
downloadlinux-6068f5063850984fe6c2490bc8384a7afa2728dc.tar.xz
V4L/DVB (9183): S2API: Return error of the caller provides 0 commands.
S2API: Return error of the caller provides 0 commands. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index bd59c95..f170e82 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1344,7 +1344,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 *
@@ -1379,7 +1379,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 *