qcacld-3.0: Fix TLV length check issue in unpack tlv

In unpack tlv, length of tag and length fields are not considered
while checking for min length for the tag, this result into failure
in unpacking the TLV.

Fix it by including length of tag and length fields while checking
for min length.

Change-Id: Icf06b935a883e41426f5fcd1668ad8461b58349f
CRs-Fixed: 2070452
This commit is contained in:
Abhishek Singh 2017-07-26 14:40:04 +05:30 • committed by snandini
commit f3cc07311a

View file

@ -33,7 +33,7 @@
*
*
* This file was automatically generated by 'framesc'
* Fri Jul 14 12:29:59 2017 from the following file(s):
* Wed Jul 26 14:38:34 2017 from the following file(s):
*
* dot11f.frms
*
@ -12111,7 +12111,7 @@ static uint32_t unpack_tlv_core(tpAniSirGlobal pCtx,
/* Now, *if* we found a hit... */
if (pTlv) {
if (len < pTlv->minSize - npec) {
if (len + (pTlv->sType + pTlv->sLen) < pTlv->minSize - npec) {
FRAMES_LOG3(pCtx, FRLOGW, FRFL("The IE %s must be "
"at least %d bytes in size, but the size is only "
"%d bytes.\n"),