From: Roel Kluin <roel.kluin@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
m-karicheri2@ti.com
Subject: [PATCH] V4L/DVB: keep index within bound in vpfe_cropcap()
Date: Mon, 26 Oct 2009 12:24:34 +0100 [thread overview]
Message-ID: <4AE586F2.9060501@gmail.com> (raw)
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));
next reply other threads:[~2009-10-26 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 11:24 Roel Kluin [this message]
2009-10-26 15:47 ` [PATCH] V4L/DVB: keep index within bound in vpfe_cropcap() Karicheri, Muralidharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AE586F2.9060501@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-media@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.