From a8376c9680c054bdd0d077df363e6af532f3bf48 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Wed, 12 Jun 2019 13:52:27 +0530 Subject: [PATCH] qcacld-3.0: Fix potential pointer dereference condition In the API blm_update_ap_info, it may happen that the scan entry is NULL, and the scan entry pointer maybe dereferenced in the debug print where the rssi print is there. Fix is to print the RSSI only when the scan entry is valid. Change-Id: I3ad973d61a0c11b6a55c8b346d54eb41956882b6 CRs-Fixed: 2469815 --- components/blacklist_mgr/core/src/wlan_blm_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/blacklist_mgr/core/src/wlan_blm_core.c b/components/blacklist_mgr/core/src/wlan_blm_core.c index f4e91e25fe11..17d1634a4422 100644 --- a/components/blacklist_mgr/core/src/wlan_blm_core.c +++ b/components/blacklist_mgr/core/src/wlan_blm_core.c @@ -115,7 +115,7 @@ blm_update_ap_info(struct blm_reject_ap *blm_entry, struct blm_config *cfg, blm_entry->rssi_reject_list = false; blm_debug("Remove from rssi reject expected RSSI = %d, current RSSI = %d, retry delay required = %d ms, delay = %lu ms", blm_entry->rssi_reject_params.expected_rssi, - scan_entry->rssi_raw, + scan_entry ? scan_entry->rssi_raw : 0, blm_entry->rssi_reject_params.retry_delay, entry_age); update_done = true;