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

Commit 3a729213 authored by Fred Oh's avatar Fred Oh Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: Compress: fix memory corruption issue in memcpy



Create an empty hw_params for the BE in set_params_fe. The machine driver
must fix this up to match DSP decoder later.

Change-Id: Iac65c80ae918e6f23394e214a802e5bd457b0371
Signed-off-by: default avatarFred Oh <fred@codeaurora.org>
parent db644c69
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -540,7 +540,7 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
				goto out;
		}

		memcpy(&fe->dpcm[fe_substream->stream].hw_params, params,
		memset(&fe->dpcm[fe_substream->stream].hw_params, 0,
				sizeof(struct snd_pcm_hw_params));

		fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
@@ -553,7 +553,7 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
		if (ret < 0)
			goto out;
	} else {
		memcpy(&fe->dpcm[fe_substream->stream].hw_params, params,
		memset(&fe->dpcm[fe_substream->stream].hw_params, 0,
				sizeof(struct snd_pcm_hw_params));

		fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;