Commit f5e20c34 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB: video/au0828: off by one bug



The "AUVI_INPUT(tmp)" macro uses "tmp" as an index of an array with
AU0828_MAX_INPUT elements.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6e1f4df7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1105,7 +1105,7 @@ static int vidioc_enum_input(struct file *file, void *priv,

	tmp = input->index;

	if (tmp > AU0828_MAX_INPUT)
	if (tmp >= AU0828_MAX_INPUT)
		return -EINVAL;
	if (AUVI_INPUT(tmp).type == 0)
		return -EINVAL;