public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] V4L/DVB: keep index within bound in vpfe_cropcap()
@ 2009-10-26 11:24 Roel Kluin
  2009-10-26 15:47 ` Karicheri, Muralidharan
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-10-26 11:24 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, linux-media, Andrew Morton, m-karicheri2

If vpfe_dev->std_index equals ARRAY_SIZE(vpfe_standards), that is
one too large

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/media/video/davinci/vpfe_capture.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c
index 402ce43..6b31e59 100644
--- a/drivers/media/video/davinci/vpfe_capture.c
+++ b/drivers/media/video/davinci/vpfe_capture.c
@@ -1577,7 +1577,7 @@ static int vpfe_cropcap(struct file *file, void *priv,
 
 	v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_cropcap\n");
 
-	if (vpfe_dev->std_index > ARRAY_SIZE(vpfe_standards))
+	if (vpfe_dev->std_index >= ARRAY_SIZE(vpfe_standards))
 		return -EINVAL;
 
 	memset(crop, 0, sizeof(struct v4l2_cropcap));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-26 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-26 11:24 [PATCH] V4L/DVB: keep index within bound in vpfe_cropcap() Roel Kluin
2009-10-26 15:47 ` Karicheri, Muralidharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox