Merge "ASoC: msm: audio-effects: misc fixes in h/w accelerated effect"
This commit is contained in:
commit
7da7cad93b
|
@ -1051,6 +1051,12 @@ int q6asm_audio_client_buf_alloc_contiguous(unsigned int dir,
|
|||
|
||||
ac->port[dir].buf = buf;
|
||||
|
||||
/* check for integer overflow */
|
||||
if ((bufcnt > 0) && ((INT_MAX / bufcnt) < bufsz)) {
|
||||
pr_err("%s: integer overflow\n", __func__);
|
||||
mutex_unlock(&ac->cmd_lock);
|
||||
goto fail;
|
||||
}
|
||||
bytes_to_alloc = bufsz * bufcnt;
|
||||
|
||||
/* The size to allocate should be multiple of 4K bytes */
|
||||
|
|
Loading…
Reference in New Issue