diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-23 05:33:06 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-08-24 04:54:09 -0300 |
commit | 174e60adf4bfb849672b3b2afdd3cfd6e65d1d3d (patch) | |
tree | 427eef27ea6cc9c8de8d721c7f117fd2ed0b9287 /drivers | |
parent | d345a5e59b0af5919f4d7f2a0d4c8dcae657e9d1 (diff) |
[media] s5k6aa: off by one in s5k6aa_enum_frame_interval()
The check is off by one so we could read one space past the end of the
array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/i2c/s5k6aa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c index 789c02a6ca1..629a5cdadd3 100644 --- a/drivers/media/i2c/s5k6aa.c +++ b/drivers/media/i2c/s5k6aa.c @@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct v4l2_subdev *sd, const struct s5k6aa_interval *fi; int ret = 0; - if (fie->index > ARRAY_SIZE(s5k6aa_intervals)) + if (fie->index >= ARRAY_SIZE(s5k6aa_intervals)) return -EINVAL; v4l_bound_align_image(&fie->width, S5K6AA_WIN_WIDTH_MIN, |