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

Commit 8aba0e88 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: add check to avoid out-of-buffer write"

parents a108e35d 9fed96ca
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1343,6 +1343,12 @@ int msm_vidc_private(void *vidc_inst, unsigned int cmd,
	int rc = 0;
	struct msm_vidc_inst *inst = (struct msm_vidc_inst *)vidc_inst;

	if (cmd != VIDIOC_VIDEO_CMD) {
		dprintk(VIDC_ERR,
			"%s: invalid private cmd %#x\n", __func__, cmd);
		return -ENOIOCTLCMD;
	}

	if (!inst || !arg) {
		dprintk(VIDC_ERR, "%s: invalid args\n", __func__);
		return -EINVAL;