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

Commit 45ca5648 authored by Soumya Managoli's avatar Soumya Managoli Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm-pcm-host-voice: Check validity of session idx



Added check for voice session index.

Change-Id: Ifff36add5d62f2fdc3395de1447075d297f2c2df
Signed-off-by: default avatarSoumya Managoli <quic_c_smanag@quicinc.com>
parent ac5c8f45
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -743,6 +743,13 @@ void hpcm_notify_evt_processing(uint8_t *data, char *session,
		return;
	}

	if (prtd->mixer_conf.sess_indx < VOICE_INDEX ||
		prtd->mixer_conf.sess_indx >= MAX_SESSION) {
		pr_err("%s:: Invalid session idx %d\n",
			__func__, prtd->mixer_conf.sess_indx);
		return;
	}

	if (notify_evt->tap_point == VSS_IVPCM_TAP_POINT_TX_DEFAULT) {
		tp = &prtd->session[prtd->mixer_conf.sess_indx].tx_tap_point;
		tmd = &prtd->mixer_conf.tx;