提交 6a4760ed 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 174e60ad
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册