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

Commit b7451081 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: add check for csid_cid to prevent of overwrite memory"

parents 854506d6 b197bdd4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -71,6 +71,14 @@ static int msm_csid_cid_lut(
		return -EINVAL;
	}
	for (i = 0; i < csid_lut_params->num_cid && i < 16; i++) {
		if (csid_lut_params->vc_cfg[i]->cid >=
			csid_lut_params->num_cid ||
			csid_lut_params->vc_cfg[i]->cid < 0) {
			pr_err("%s: cid outside range %d\n",
				 __func__, csid_lut_params->vc_cfg[i]->cid);
			return -EINVAL;
		}

		CDBG("%s lut params num_cid = %d, cid = %d\n",
			__func__,
			csid_lut_params->num_cid,