Преглед на файлове

qcacld-3.0: NULL pointer dereference in assoc completion handler

BSS description is dereferencing in hdd_association_completion_handler
without checking for NULL, which may cause NULL pointer dereference.

To address this, add check for BSS description before dereferencing.

Change-Id: I24f728fb6d66b4c07dfe39f3ac426f3d2153b917
CRs-Fixed: 2299797
Dundi Raviteja преди 6 години
родител
ревизия
ffa9bf4798
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      core/hdd/src/wlan_hdd_assoc.c

+ 4 - 2
core/hdd/src/wlan_hdd_assoc.c

@@ -3262,8 +3262,10 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 		hdd_debug("check for SAP restart");
 		policy_mgr_check_concurrent_intf_and_restart_sap(
 			hdd_ctx->hdd_psoc);
-		policy_mgr_checkn_update_hw_mode_single_mac_mode
-			(hdd_ctx->hdd_psoc, roam_info->pBssDesc->channelId);
+		if (roam_info->pBssDesc)
+			policy_mgr_checkn_update_hw_mode_single_mac_mode
+				(hdd_ctx->hdd_psoc,
+				 roam_info->pBssDesc->channelId);
 	} else {
 		bool connect_timeout = false;
 		/* do we need to change the HW mode */