Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed300132 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

Staging: cx25821: off by one in cx25821_enum_input()



The INPUT(n) macro indexes an array of size 2.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7a02f549
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)