wifihal: Fix possible buffer-overflow during TLV read

The function NANTLV_ReadTlv currently doesn't checks if the
amount of bytes in the TLV buffer is bigger than what is
encoded within the TLVs.

This commit adds checks for the availability of the buffer
before reading the incoming TLVs.

Change-Id: I0336ebbdcdc5db949ee275e22895ec83cdcafcc8
CRs-Fixed: 2836493
4 files changed
tree: 1606a621b68c14f703959828320bf33799cfc4c9
  1. cld80211-lib/
  2. qcwcn/
  3. wcnss-service/
  4. Android.mk