Commit 6068f506 authored by Steven Toth's avatar Steven Toth Committed by Mauro Carvalho Chehab

V4L/DVB (9183): S2API: Return error of the caller provides 0 commands.

S2API: Return error of the caller provides 0 commands.
Signed-off-by: default avatarSteven Toth <stoth@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ef526f42
...@@ -1344,7 +1344,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -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 /* Put an arbitrary limit on the number of messages that can
* be sent at once */ * be sent at once */
if (tvps->num > DTV_IOCTL_MAX_MSGS) if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
return -EINVAL; return -EINVAL;
tvp = (struct dtv_property *) kmalloc(tvps->num * tvp = (struct dtv_property *) kmalloc(tvps->num *
...@@ -1379,7 +1379,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -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 /* Put an arbitrary limit on the number of messages that can
* be sent at once */ * be sent at once */
if (tvps->num > DTV_IOCTL_MAX_MSGS) if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
return -EINVAL; return -EINVAL;
tvp = (struct dtv_property *) kmalloc(tvps->num * tvp = (struct dtv_property *) kmalloc(tvps->num *
......
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