projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75d63a4
)
[media] av7110: potential divide by zero
author
Dan Carpenter
<
[email protected]
>
Tue, 10 Nov 2015 22:23:53 +0000
(20:23 -0200)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Tue, 17 Nov 2015 16:38:18 +0000
(14:38 -0200)
"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 <
[email protected]
>
Signed-off-by: Hans Verkuil <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/pci/ttpci/av7110_av.c
patch
|
blob
|
history
diff --git
a/drivers/media/pci/ttpci/av7110_av.c
b/drivers/media/pci/ttpci/av7110_av.c
index ccb3b2c89ef8385e0932e12e20fa02bf6f2981f2..1cf906047353c87534dae78831e471a8f34060c2 100644
(file)
--- 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
dprintk(2, "av7110:%p, \n", av7110);
+ if (len == 0)
+ return 0;
+
if (!(av7110->playing & RP_VIDEO)) {
if (av7110_av_start_play(av7110, RP_VIDEO) < 0)
return -EBUSY;