summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgaurank kathpalia <gkathpal@codeaurora.org>2018-06-18 18:26:15 +0530
committernshrivas <nshrivas@codeaurora.org>2018-07-03 10:00:35 -0700
commit6426679933be623c480dfda67275fa7946143b4b (patch)
treef47bd6668f69d6bad5c30119e18ff382296fc278
parentb568f23ed5d7ee4a1708a233f6abc453af22fdf3 (diff)
qcacld-3.0: Fix pointer dereference condition
In the API lim_perform_ft_pre_auth, the driver sends a auth frame to a peer whose MAC address is extracted from the session entry, and it may happen that the pointer tpftPEContext is NULL, which results in pointer dereference. Fix is to send an auth frame only if the sFTPEContext is valid. Change-Id: I5544739a0b438efcc0216bbccdcff113946b330b CRs-Fixed: 2259250
-rw-r--r--core/mac/src/pe/lim/lim_ft_preauth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/mac/src/pe/lim/lim_ft_preauth.c b/core/mac/src/pe/lim/lim_ft_preauth.c
index c8d1f5212e08..24c98a3313b5 100644
--- a/core/mac/src/pe/lim/lim_ft_preauth.c
+++ b/core/mac/src/pe/lim/lim_ft_preauth.c
@@ -292,10 +292,10 @@ void lim_perform_ft_pre_auth(tpAniSirGlobal pMac, QDF_STATUS status,
lim_diag_event_report(pMac, WLAN_PE_DIAG_ROAM_AUTH_START_EVENT,
pMac->lim.pSessionEntry, eSIR_SUCCESS, eSIR_SUCCESS);
#endif
-
- lim_send_auth_mgmt_frame(pMac, &authFrame,
- psessionEntry->ftPEContext.pFTPreAuthReq->preAuthbssId,
- LIM_NO_WEP_IN_FC, psessionEntry);
+ if (psessionEntry->ftPEContext.pFTPreAuthReq)
+ lim_send_auth_mgmt_frame(pMac, &authFrame,
+ psessionEntry->ftPEContext.pFTPreAuthReq->preAuthbssId,
+ LIM_NO_WEP_IN_FC, psessionEntry);
return;