Merge "ASoC: msm: audio-effects: misc fixes in h/w accelerated effect"

This commit is contained in:
Linux Build Service Account 2016-08-13 23:36:36 -07:00 committed by Gerrit - the friendly Code Review server
commit 7da7cad93b
1 changed files with 6 additions and 0 deletions

View File

@ -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 */