summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-23 12:33:48 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-24 11:54:17 +0400
commit6a4760ed50e4908cfd597be0d840a0cb990aff7a (patch)
tree35811f71031a3700a1d2fc00face58f89f414ffd /drivers/media
parent174e60adf4bfb849672b3b2afdd3cfd6e65d1d3d (diff)
downloadlinux-6a4760ed50e4908cfd597be0d840a0cb990aff7a.tar.xz
[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')
-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)