diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-23 10:33:48 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-08-24 09:54:17 +0200 |
commit | 6a4760ed50e4908cfd597be0d840a0cb990aff7a (patch) | |
tree | 35811f71031a3700a1d2fc00face58f89f414ffd | |
parent | [media] s5k6aa: off by one in s5k6aa_enum_frame_interval() (diff) | |
download | linux-6a4760ed50e4908cfd597be0d840a0cb990aff7a.tar.xz 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>
-rw-r--r-- | drivers/media/i2c/ov9650.c | 2 |
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) |