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

Commit ba38acb1 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] vivi: fix ENUM_FRAMEINTERVALS implementation



This function never checked if width and height are correct. Add such
a check so the v4l2-compliance tool returns OK again for vivi.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 48d829da
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1121,7 +1121,11 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv,
	if (!fmt)
		return -EINVAL;

	/* regarding width & height - we support any */
	/* check for valid width/height */
	if (fival->width < 48 || fival->width > MAX_WIDTH || (fival->width & 3))
		return -EINVAL;
	if (fival->height < 32 || fival->height > MAX_HEIGHT)
		return -EINVAL;

	fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS;