Wifi-Hal: Avoid accessing invalid memory while parsing pkt stats

Current implementation of packet stats parsing isn't validating
remaining buflen, which might lead to accessing invalid memory
location while parsing. To address this issue, we need to check
whether received buflen is sufficient to parse the stat before
reading the stats from nlmsg.
   While parsing pkt stats, the bufflen shall be decremented for
all versions of packet log records. Add logic to decrement buflen
for the missed versions also.

Change-Id: I573a5158b97f2c2b1b59026a8ae14e23ffc8135f
CRs-Fixed: 2422931
Bug: 130226017
Test: Manual Test, turn verbose logging and check pkt log
2 files changed
tree: f9db646b7bf3e50059ba48b63c146fdaa0d4ac0e
  1. cld80211-lib/
  2. qcwcn/
  3. Android.mk
  4. OWNERS