Bläddra i källkod

qcacld-3.0: Add null check in lim_populate_vht_mcs_set() API

session_entry pointer has been dereferenced without checking against
NULL.

Add NULL check before dereferencing it.

CRs-Fixed: 2232738
Change-Id: I899a5da2affd70acf274bdceca11e9d47c7659b5
Krunal Soni 7 år sedan
förälder
incheckning
3e4a3b62f7
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      core/mac/src/pe/lim/lim_assoc_utils.c

+ 2 - 2
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -1388,7 +1388,7 @@ tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
 			VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
 		rates->vhtRxHighestDataRate =
 			VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
-		if (!session_entry->ch_width &&
+		if (session_entry && !session_entry->ch_width &&
 				!mac_ctx->roam.configParam.enable_vht20_mcs9 &&
 				((rates->vhtRxMCSMap & VHT_1x1_MCS_MASK) ==
 				 VHT_1x1_MCS9_MAP)) {
@@ -1398,7 +1398,7 @@ tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
 					NSS_1x1_MODE);
 		}
 	} else {
-		if (!session_entry->ch_width &&
+		if (session_entry && !session_entry->ch_width &&
 				!mac_ctx->roam.configParam.enable_vht20_mcs9 &&
 				((rates->vhtRxMCSMap & VHT_2x2_MCS_MASK) ==
 				 VHT_2x2_MCS9_MAP)) {