diff options
author | Soumya Managoli <quic_c_smanag@quicinc.com> | 2023-08-17 18:15:06 +0530 |
---|---|---|
committer | Errikayala Subramanyam <quic_esubrama@quicinc.com> | 2023-08-25 03:33:29 -0700 |
commit | 343ff94af04d5dcb99725b98c28662df7543a73f (patch) | |
tree | 7de45d08d4dc1017f2935adef4f5d99c861f86f4 | |
parent | 552544deb1345d9318d7a4b0ec4f8911572944c0 (diff) |
msm-pcm-host-voice: Check validity of session idx
Added check for voice session index.
Change-Id: Ifff36add5d62f2fdc3395de1447075d297f2c2df
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
(cherry picked from commit fd59b4b0abb1efb064f705fb47723a9262be9a0f)
-rw-r--r-- | sound/soc/msm/qdsp6v2/msm-pcm-host-voice-v2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-host-voice-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-host-voice-v2.c index b02ab78684fb..bb4ab8f4a549 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-host-voice-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-host-voice-v2.c @@ -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; |