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

Commit b036f1cb authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] zc3xx: don't go past quality array



drivers/media/usb/gspca/zc3xx.c:6363 zcxx_s_ctrl() error: buffer overflow 'jpeg_qual' 3 <= 3

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 82e3b88b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6360,7 +6360,7 @@ static int zcxx_s_ctrl(struct v4l2_ctrl *ctrl)
			if (ctrl->val <= jpeg_qual[i])
				break;
		}
		if (i > 0 && i == qual && ctrl->val < jpeg_qual[i])
		if (i == ARRAY_SIZE(jpeg_qual) || (i > 0 && i == qual && ctrl->val < jpeg_qual[i]))
			i--;

		/* With high quality settings we need max bandwidth */