mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
ASoC: msm-pcm-q6-v2: Add size check
Check if buf size is valid before comparing with buf offset. Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com> Change-Id: I8336be046c4922ce2f8bb333b58ca867059e9528
This commit is contained in:
parent
8f7501ee82
commit
c17bb7ef22
1 changed files with 1 additions and 1 deletions
|
|
@ -1329,7 +1329,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
|
|||
offset = prtd->in_frame_info[idx].offset;
|
||||
pr_debug("Offset value = %d\n", offset);
|
||||
|
||||
if (offset >= size) {
|
||||
if (size && offset >= size) {
|
||||
pr_err("%s: Invalid dsp buf offset\n", __func__);
|
||||
ret = -EFAULT;
|
||||
q6asm_cpu_buf_release(OUT, prtd->audio_client);
|
||||
|
|
|
|||
Loading…
Reference in a new issue