소스 검색

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 6 년 전
부모
커밋
03ce8e7017
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      blacklist_mgr/core/src/wlan_blm_core.c

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