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

Commit 5180cefe authored by Surendar karka's avatar Surendar karka Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: qdsp6v2: check param length for EAC3 format



Initialize param length with user space argument and
check the condition for maximum length in
SND_AUDIOCODEC_EAC3 format.

CRs-Fixed: 1032820
Change-Id: I710c1f743d7502e93989e8cc487078366570e723
Signed-off-by: default avatarSurendar karka <sukark@codeaurora.org>
parent e99d73e0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1070,6 +1070,7 @@ static int msm_compr_ioctl_shared(struct snd_pcm_substream *substream,
				__func__, ddp->params_length);
				return -EINVAL;
			}
			params_length = ddp->params_length*sizeof(int);
			if (params_length > MAX_AC3_PARAM_SIZE) {
				/*MAX is 36*sizeof(int) this should not happen*/
				pr_err("%s: params_length(%d) is greater than %zd\n",