diff options
| author | Padma, Santhosh Kumar <skpadma@qti.qualcomm.com> | 2014-01-15 22:24:23 +0530 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2014-01-25 21:02:05 -0800 |
| commit | ed2330f2e5e4c296866f505171032987f87455ab (patch) | |
| tree | e3c0a417085e3a6e9efa2be257363c22c0d45c87 | |
| parent | fccd2403a2917a2cee78bc498cc1079d04923af2 (diff) | |
wlan: rrm: Fix Null pointer de-referencing of pCurMeasReqIe.
If the channel number provided in the Scan results is not matching
with the channel number requested for in beacon report request
by the AP, pCurMeasReqIe will be NULL> And the current code
de-references the measurement duration without NULL check.
Modified the code to do NULL check before accessing the
pCurMeasReqIe
Change-Id: I6f3b8ebd501cadb90a21847bd7c044bbbeb30448
CRs-Fixed: 600615
| -rw-r--r-- | CORE/SME/src/rrm/sme_rrm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CORE/SME/src/rrm/sme_rrm.c b/CORE/SME/src/rrm/sme_rrm.c index 8019c00e459a..b4fb9f4b9512 100644 --- a/CORE/SME/src/rrm/sme_rrm.c +++ b/CORE/SME/src/rrm/sme_rrm.c @@ -352,7 +352,8 @@ static eHalStatus sme_CcxSendBeaconReqScanResults(tpAniSirGlobal pMac, break; } } - pBcnReport->measurementToken = pCurMeasReqIe->measurementToken; + if(NULL != pCurMeasReqIe) + pBcnReport->measurementToken = pCurMeasReqIe->measurementToken; smsLog( pMac, LOG1, "Channel(%d) MeasToken(%d)", channel, pBcnReport->measurementToken); msgCounter=0; @@ -364,7 +365,8 @@ static eHalStatus sme_CcxSendBeaconReqScanResults(tpAniSirGlobal pMac, ie_len = GET_IE_LEN_IN_BSS( pBssDesc->length ); pBcnReport->bcnRepBssInfo[msgCounter].bcnReportFields.ChanNum = pBssDesc->channelId; pBcnReport->bcnRepBssInfo[msgCounter].bcnReportFields.Spare = 0; - pBcnReport->bcnRepBssInfo[msgCounter].bcnReportFields.MeasDuration = pCurMeasReqIe->measurementDuration; + if(NULL != pCurMeasReqIe) + pBcnReport->bcnRepBssInfo[msgCounter].bcnReportFields.MeasDuration = pCurMeasReqIe->measurementDuration; pBcnReport->bcnRepBssInfo[msgCounter].bcnReportFields.PhyType = pBssDesc->nwType; pBcnReport->bcnRepBssInfo[msgCounter].bcnReportFields.RecvSigPower = pBssDesc->rssi; pBcnReport->bcnRepBssInfo[msgCounter].bcnReportFields.ParentTsf = pBssDesc->parentTSF; |
