summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanumantha Reddy Pothula <c_hpothu@qti.qualcomm.com>2016-04-07 12:07:47 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-07-04 17:01:37 +0530
commit28ca97e82100a7d8a6e5bb60266d24166b2250da (patch)
treea38ac91db76b7346fc4b14b37274e5603f4e2662
parentfc09b83aaedc8cacb5c9af01e2dacda3da57cde3 (diff)
qcacld-2.0: Resolve static analysis issues
prima to qcacld-2.0 propagation Resolved static analysis issues, variable initialization, return on failure, validate data before using. Change-Id: Ia6ffd422ae3f9bc8419f32aa914839a091841335 CRs-Fixed: 975049
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c3
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c1
-rw-r--r--CORE/SYS/legacy/src/utils/src/parserApi.c18
3 files changed, 14 insertions, 8 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index b30f45e714d4..f77e2946abd4 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -22564,7 +22564,8 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
{
VOS_STATUS status;
unsigned long rc;
- tCsrTdlsLinkEstablishParams tdlsLinkEstablishParams;
+ tCsrTdlsLinkEstablishParams tdlsLinkEstablishParams = { {0}, 0,
+ 0, 0, 0, 0, 0, 0, {0}, 0, {0} };
pTdlsPeer = wlan_hdd_tdls_find_peer(pAdapter, peer, TRUE);
if (NULL == pTdlsPeer)
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index bc7240abdadd..64939fe8a436 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -1180,6 +1180,7 @@ limProcessMlmAuthInd(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
// Log error
limLog(pMac, LOGP,
FL("call to AllocateMemory failed for eWNI_SME_AUTH_IND"));
+ return;
}
limCopyU16((tANI_U8 *) &pSirSmeAuthInd->messageType, eWNI_SME_AUTH_IND);
limAuthIndSerDes(pMac, (tpLimMlmAuthInd) pMsgBuf,
diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c
index f1c5a2082fe3..a368dec38974 100644
--- a/CORE/SYS/legacy/src/utils/src/parserApi.c
+++ b/CORE/SYS/legacy/src/utils/src/parserApi.c
@@ -3327,15 +3327,19 @@ sirFillBeaconMandatoryIEforEseBcnReport(tpAniSirGlobal pMac,
retStatus = eSIR_FAILURE;
goto err_bcnrep;
}
- *pos = SIR_MAC_RATESET_EID;
- pos++;
- *pos = eseBcnReportMandatoryIe.supportedRates.numRates;
- pos++;
- vos_mem_copy(pos,
+ if (eseBcnReportMandatoryIe.supportedRates.numRates <=
+ SIR_MAC_RATESET_EID_MAX) {
+ *pos = SIR_MAC_RATESET_EID;
+ pos++;
+ *pos = eseBcnReportMandatoryIe.supportedRates.numRates;
+ pos++;
+ vos_mem_copy(pos,
(tANI_U8*)eseBcnReportMandatoryIe.supportedRates.rate,
eseBcnReportMandatoryIe.supportedRates.numRates);
- pos += eseBcnReportMandatoryIe.supportedRates.numRates;
- freeBytes -= (1 + 1 + eseBcnReportMandatoryIe.supportedRates.numRates);
+ pos += eseBcnReportMandatoryIe.supportedRates.numRates;
+ freeBytes -= (1 + 1 +
+ eseBcnReportMandatoryIe.supportedRates.numRates);
+ }
}
/* Fill FH Parameter set IE */