mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoC: msm: audio-effects: misc fixes in h/w accelerated
effect Adding memory copy size check and integer overflow check in h/w accelerated effect driver. Change-Id: I17d4cc0a38770f0c5067fa8047cd63e7bf085e48 CRs-Fixed: 1006609 Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
This commit is contained in:
parent
f6c251ef75
commit
1301ad430e
1 changed files with 6 additions and 0 deletions
|
@ -725,6 +725,12 @@ int q6asm_audio_client_buf_alloc_contiguous(unsigned int dir,
|
|||
|
||||
ac->port[dir].buf = buf;
|
||||
|
||||
if ((bufcnt > 0) && ((INT_MAX / bufcnt) < bufsz)) {
|
||||
pr_err("%s: integer overflow", __func__);
|
||||
mutex_unlock(&ac->cmd_lock);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
buf[0].client = msm_ion_client_create(UINT_MAX, "audio_client");
|
||||
if (IS_ERR_OR_NULL((void *)buf[0].client)) {
|
||||
pr_err("%s: ION create client for AUDIO failed\n", __func__);
|
||||
|
|
Loading…
Reference in a new issue