* [patch] video/au0828: off by one bug
@ 2010-03-28 11:21 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-03-28 11:21 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Devin Heitmueller, Michael Krufky, Laurent Pinchart, Hans Verkuil,
linux-media, linux-kernel, kernel-janitors
The "AUVI_INPUT(tmp)" macro uses "tmp" as an index of an array with
AU0828_MAX_INPUT elements.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c
index dc67bc4..19a5773 100644
--- a/drivers/media/video/au0828/au0828-video.c
+++ b/drivers/media/video/au0828/au0828-video.c
@@ -1104,7 +1104,7 @@ static int vidioc_enum_input(struct file *file, void *priv,
tmp = input->index;
- if (tmp > AU0828_MAX_INPUT)
+ if (tmp >= AU0828_MAX_INPUT)
return -EINVAL;
if (AUVI_INPUT(tmp).type == 0)
return -EINVAL;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-28 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-28 11:21 [patch] video/au0828: off by one bug Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox