summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c3
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c20
2 files changed, 14 insertions, 9 deletions
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index d8f7a01053d4..86347d36b7f2 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -4387,7 +4387,8 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
{
QDF_STATUS status;
unsigned long rc;
- tCsrTdlsLinkEstablishParams tdlsLinkEstablishParams;
+ tCsrTdlsLinkEstablishParams tdlsLinkEstablishParams = { {0}, 0,
+ 0, 0, 0, 0, 0, {0}, 0, {0} };
pTdlsPeer =
wlan_hdd_tdls_find_peer(pAdapter, peer, true);
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index a2133316ec3e..ea28db9032d7 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -3268,17 +3268,21 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac,
retStatus = eSIR_FAILURE;
goto err_bcnrep;
}
- *pos = SIR_MAC_RATESET_EID;
- pos++;
- *pos = eseBcnReportMandatoryIe.supportedRates.numRates;
- pos++;
- qdf_mem_copy(pos,
+ if (eseBcnReportMandatoryIe.supportedRates.numRates <=
+ SIR_MAC_RATESET_EID_MAX) {
+ *pos = SIR_MAC_RATESET_EID;
+ pos++;
+ *pos = eseBcnReportMandatoryIe.supportedRates.numRates;
+ pos++;
+ qdf_mem_copy(pos,
(uint8_t *) 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 */