diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-11-10 17:23:53 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-11-17 11:38:18 -0500 |
commit | 0dac45f0e5a5f55cf454e9e2ca86221539e63357 (patch) | |
tree | 7c407b3decbf99c6eb3b6e9996e390e7d5e7b3e2 | |
parent | 75d63a40a5c01cf6ba9572cb124488a0e3baa6c1 (diff) |
[media] av7110: potential divide by zero
"len" comes from dvb_video_ioctl() and there is a possibility that it is
zero. We do a divide by len later in the function so that's not ok.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/pci/ttpci/av7110_av.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/pci/ttpci/av7110_av.c b/drivers/media/pci/ttpci/av7110_av.c index ccb3b2c89ef8..1cf906047353 100644 --- a/drivers/media/pci/ttpci/av7110_av.c +++ b/drivers/media/pci/ttpci/av7110_av.c | |||
@@ -1045,6 +1045,9 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len | |||
1045 | 1045 | ||
1046 | dprintk(2, "av7110:%p, \n", av7110); | 1046 | dprintk(2, "av7110:%p, \n", av7110); |
1047 | 1047 | ||
1048 | if (len == 0) | ||
1049 | return 0; | ||
1050 | |||
1048 | if (!(av7110->playing & RP_VIDEO)) { | 1051 | if (!(av7110->playing & RP_VIDEO)) { |
1049 | if (av7110_av_start_play(av7110, RP_VIDEO) < 0) | 1052 | if (av7110_av_start_play(av7110, RP_VIDEO) < 0) |
1050 | return -EBUSY; | 1053 | return -EBUSY; |