mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoC: msm: Validate pcm buffer size
Check if pcm samples to be copied is greater than the kernel buffer size. Change-Id: Ieddd3a3299640ebea0225985d13952045d5dc5c9 CRs-fixed: 813448 Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
This commit is contained in:
parent
ba9db7d517
commit
eb02886309
1 changed files with 3 additions and 0 deletions
|
@ -445,6 +445,9 @@ static int msm_pcm_playback_copy(struct snd_pcm_substream *substream, int a,
|
|||
}
|
||||
|
||||
data = q6asm_is_cpu_buf_avail(IN, prtd->audio_client, &size, &idx);
|
||||
if (fbytes > size)
|
||||
fbytes = size;
|
||||
|
||||
bufptr = data;
|
||||
if (bufptr) {
|
||||
pr_debug("%s:fbytes =%d: xfer=%d size=%d\n",
|
||||
|
|
Loading…
Reference in a new issue