提交 174e60ad 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 d345a5e5
...@@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct v4l2_subdev *sd, ...@@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct v4l2_subdev *sd,
const struct s5k6aa_interval *fi; const struct s5k6aa_interval *fi;
int ret = 0; int ret = 0;
if (fie->index > ARRAY_SIZE(s5k6aa_intervals)) if (fie->index >= ARRAY_SIZE(s5k6aa_intervals))
return -EINVAL; return -EINVAL;
v4l_bound_align_image(&fie->width, S5K6AA_WIN_WIDTH_MIN, v4l_bound_align_image(&fie->width, S5K6AA_WIN_WIDTH_MIN,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册