From 3e4a3b62f77d791d82858074726a6788ffa8feb8 Mon Sep 17 00:00:00 2001 From: Krunal Soni Date: Thu, 3 May 2018 14:09:47 -0700 Subject: [PATCH] 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 --- core/mac/src/pe/lim/lim_assoc_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 3fd610c10b32..92e69ae5065b 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/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)) {