qcacld-2.0: Add presence check for structure tDot11fQosMapConfigure

Current logic use the "not present" structure tDot11fQosMapConfigure
to calculate the array index which lead to the array overflow and
crash of VosMCThread. Add check code to avoid this problem.

Change-Id: Ifa08b24a06e409fed1bd445574127fef02f21d19
CRs-Fixed: 978582
This commit is contained in:
c_zding 2016-02-19 09:37:56 +08:00 committed by syphyr
parent d23fea4e24
commit e26755ec3e
1 changed files with 2 additions and 2 deletions

View File

@ -4643,10 +4643,10 @@ sirConvertQosMapConfigureFrame2Struct(tpAniSirGlobal pMac,
tDot11fQosMapConfigure mapConfigure;
tANI_U32 status;
status = dot11fUnpackQosMapConfigure(pMac, pFrame, nFrame, &mapConfigure);
if ( DOT11F_FAILED( status ) )
if ( DOT11F_FAILED( status ) || !mapConfigure.QosMapSet.present )
{
dot11fLog(pMac, LOGE,
FL("Failed to parse Qos Map Config frame(0x%08x, %d bytes):"),
FL("Failed to parse or QosMapSet not present(0x%08x, %d bytes):"),
status, nFrame);
PELOG2(sirDumpBuf(pMac, SIR_DBG_MODULE_ID, LOG2, pFrame, nFrame);)
return eSIR_FAILURE;