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

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

Merge "ASOC: msm: Restrict loop index to avoid buffer overread" into msm-4.9

parents faf81fec 14986209
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -818,6 +818,10 @@ int msm_dolby_dap_param_to_get_control_get(struct snd_kcontrol *kcontrol,
			 __func__, copp_idx);
		return -EINVAL;
	}
	if (dolby_dap_params_get.length > 128 - DOLBY_PARAM_PAYLOAD_SIZE) {
		pr_err("%s: Incorrect parameter length", __func__);
		return -EINVAL;
	}
	params_value = kzalloc(params_length + param_payload_len, GFP_KERNEL);
	if (!params_value)
		return -ENOMEM;