提交 ed300132 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

Staging: cx25821: off by one in cx25821_enum_input()

The INPUT(n) macro indexes an array of size 2.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 7a02f549
......@@ -876,7 +876,7 @@ int cx25821_enum_input(struct cx25821_dev *dev, struct v4l2_input *i)
dprintk(1, "%s()\n", __func__);
n = i->index;
if (n > 2)
if (n >= 2)
return -EINVAL;
if (0 == INPUT(n)->type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册