qcacld-3.0: Fix buffer overwrite in wma_unified_debug_print_event_handler

In function wma_unified_debug_print_event_handler, datalen is
received from the FW and is used to mem copy data buffer from
FW into the local array dbgbuf. Since dbgbuf is a local array
of size 500 bytes, if datalen is greater than 500, buffer
overwrite occurs during memcpy.

Add sanity check to limit datalen to 500 bytes if value received
is greater than 500 bytes.

Change-Id: Id63b5106bc7a3d3836d17ae47d019bc8a71c928e
CRs-Fixed: 2134801
1 file changed
tree: 8b2499c8edb335f1b3070c3098bd907fcc3d782e
  1. components/
  2. core/
  3. uapi/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile
  8. README.txt