summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/ov9650.c
diff options
context:
space:
mode:
authorDan Carpenter2013-08-23 10:33:48 +0200
committerMauro Carvalho Chehab2013-08-24 09:54:17 +0200
commit6a4760ed50e4908cfd597be0d840a0cb990aff7a (patch)
tree35811f71031a3700a1d2fc00face58f89f414ffd /drivers/media/i2c/ov9650.c
parent[media] s5k6aa: off by one in s5k6aa_enum_frame_interval() (diff)
downloadkernel-qcow2-linux-6a4760ed50e4908cfd597be0d840a0cb990aff7a.tar.gz
kernel-qcow2-linux-6a4760ed50e4908cfd597be0d840a0cb990aff7a.tar.xz
kernel-qcow2-linux-6a4760ed50e4908cfd597be0d840a0cb990aff7a.zip
[media] ov9650: off by one in ov965x_enum_frame_sizes()
The ">" should be ">=" otherwise we read one space beyond the end of the array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c/ov9650.c')
-rw-r--r--drivers/media/i2c/ov9650.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c
index 1dbb8118a285..4da90c621f7e 100644
--- a/drivers/media/i2c/ov9650.c
+++ b/drivers/media/i2c/ov9650.c
@@ -1083,7 +1083,7 @@ static int ov965x_enum_frame_sizes(struct v4l2_subdev *sd,
{
int i = ARRAY_SIZE(ov965x_formats);
- if (fse->index > ARRAY_SIZE(ov965x_framesizes))
+ if (fse->index >= ARRAY_SIZE(ov965x_framesizes))
return -EINVAL;
while (--i)