diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 4 |
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 bd59c9514ab5..f170e822fadc 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, | |||
1344 | 1344 | ||
1345 | /* Put an arbitrary limit on the number of messages that can | 1345 | /* Put an arbitrary limit on the number of messages that can |
1346 | * be sent at once */ | 1346 | * be sent at once */ |
1347 | if (tvps->num > DTV_IOCTL_MAX_MSGS) | 1347 | if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS)) |
1348 | return -EINVAL; | 1348 | return -EINVAL; |
1349 | 1349 | ||
1350 | tvp = (struct dtv_property *) kmalloc(tvps->num * | 1350 | tvp = (struct dtv_property *) kmalloc(tvps->num * |
@@ -1379,7 +1379,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, | |||
1379 | 1379 | ||
1380 | /* Put an arbitrary limit on the number of messages that can | 1380 | /* Put an arbitrary limit on the number of messages that can |
1381 | * be sent at once */ | 1381 | * be sent at once */ |
1382 | if (tvps->num > DTV_IOCTL_MAX_MSGS) | 1382 | if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS)) |
1383 | return -EINVAL; | 1383 | return -EINVAL; |
1384 | 1384 | ||
1385 | tvp = (struct dtv_property *) kmalloc(tvps->num * | 1385 | tvp = (struct dtv_property *) kmalloc(tvps->num * |