Эх сурвалжийг харах

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
gaurank kathpalia 5 жил өмнө
parent
commit
a8376c9680

+ 1 - 1
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;