ASoC: msm-pcm-q6-v2: Add dsp buf check

Current logic copies user buf size of data
from the avail dsp buf at a given offset.
If this offset returned from DSP in READ_DONE event
goes out of bounds or is corrupted, then it can lead to
out of bounds DSP buffer access, resulting in memory fault.
Fix is to add check for this buf offset, if it is within
the buf size range.

Change-Id: I7753cc6db394704dbb959477150141d42b836bef
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Issue: FP3SEC-987
(cherry picked from commit 28658bc2a0a290fdfcab61bed67e89874e99ca47)
1 file changed
tree: eae06bcf1fa2d80fe7240fcd68dd54e24fdb691f
  1. asoc/
  2. config/
  3. dsp/
  4. include/
  5. ipc/
  6. soc/
  7. Android.mk
  8. Makefile
  9. Makefile.am
  10. NOTICE