qcacld-2.0: Add sanity check for wmi TLV length

Add sanity check for wmi TLV header length before padding/shrinking
elements in a wmi which has a variable length for its TLV structure.

Currently, the TLV length is not checked so its maximum value could
be 65535 which results in a hugh count for elements. Number of elements
is used to terminate the loop for padding/shrinking. If the number
was too large, there would be memory overflow.

CRs-Fixed: 2169157
Change-Id: I99c700d62f8c0db84cbd95fc6efcb5249b89eb1d
1 file changed
tree: 724f19503afe36e41b2e9d3f8f34761609f2528a
  1. CORE/
  2. firmware_bin/
  3. wcnss/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile