aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-11-04 12:16:25 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:12 -0500
commit0b66cf90371dcd28c6eb98904adb694ae98eb20f (patch)
treecd40ec966e16910006cbe01c143210d8f659cc5f /drivers/media
parent648732fcefa73932ae8caa8bcfd262863904dd66 (diff)
V4L/DVB (13285): vpfe_capture: keep index within bound in vpfe_cropcap()
If vpfe_dev->std_index equals ARRAY_SIZE(vpfe_standards), that is one too large. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/davinci/vpfe_capture.c2
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 402ce43ef38e..6b31e59f47f3 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,
1577 1577
1578 v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_cropcap\n"); 1578 v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_cropcap\n");
1579 1579
1580 if (vpfe_dev->std_index > ARRAY_SIZE(vpfe_standards)) 1580 if (vpfe_dev->std_index >= ARRAY_SIZE(vpfe_standards))
1581 return -EINVAL; 1581 return -EINVAL;
1582 1582
1583 memset(crop, 0, sizeof(struct v4l2_cropcap)); 1583 memset(crop, 0, sizeof(struct v4l2_cropcap));