Skip to content

Commit

Permalink
Staging: cx25821: off by one in cx25821_enum_input()
Browse files Browse the repository at this point in the history
The INPUT(n) macro indexes an array of size 2.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 7a02f54 commit ed30013
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/cx25821/cx25821-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ed30013

Please sign in to comment.