diff options
| author | Soumya Managoli <quic_c_smanag@quicinc.com> | 2023-08-17 18:15:06 +0530 |
|---|---|---|
| committer | Georg Veichtlbauer <georg@vware.at> | 2023-09-26 22:07:51 +0200 |
| commit | 1b91a607526440d899ed597419df89d40d467a0d (patch) | |
| tree | 46f56030dcf526602670ac76168acc28bf3f7bab | |
| parent | 264e08cc026638cc1d6b434ea6d80d439937fe24 (diff) | |
msm-pcm-host-voice: Check validity of session idx
Check added for voice session index.
Change-Id: Ifff36add5d62f2fdc3395de1447075d297f2c2df
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
| -rw-r--r-- | sound/soc/msm/qdsp6v2/msm-pcm-host-voice-v2.c | 8 |
1 files changed, 8 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..495d8b9e9354 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-host-voice-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-host-voice-v2.c @@ -1,4 +1,5 @@ /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -743,6 +744,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; |
