drivers/media/video/au0828/au0828-video.c: off by one bug
PATCH 5/11 drivers/media/video/au0828/au0828-video.c: off by one bug
From: Dan Carpenter <[email protected]>
The "AUVI_INPUT(tmp)" macro uses "tmp" as an index of an array with AU0828_MAX_INPUT elements.
Signed-off-by Dan Carpenter <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Hans Verkuil <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/media/video/au0828/au0828-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/video/au0828/au0828-video.c renamed from drivers/media/video/au0828/au0828-video.c~drivers-media-video-au0828-au0828-videoc-off-by-one-bug +1 -1
@@ -1105,7 +1105,7 @@ static int vidioc_enum_input(struct file tmp = input->index; -if (tmp >AU0828_MAX_INPUT ) +if (tmp >=AU0828_MAX_INPUT )return -EINVAL ;if (AUVI_INPUT (tmp).type ==0 )return -EINVAL ;
_