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

Commit 44ba031b 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: Ia96f58316e42fb6f09086354e065b621cecf5bbb
Signed-off-by: default avatarSoumya Managoli <quic_c_smanag@quicinc.com>
parent 315c6f41
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -735,6 +735,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;