ソースを参照

qcacld-3.0: Avoid NULL pointer exception in (re)assoc event

In hdd_send_association_event() and hdd_send_re_assoc_event(), there is
no check of pBssDesc against NULL which can lead to NULL pointer exception.
Circumvent this issue by adding NULL check.

Change-Id: Ic3a0142b4ea3f058e8d3993fb491d418ddb8f70d
CRs-Fixed: 2232721
Rajeev Kumar Sirasanagandla 7 年 前
コミット
e5582aa7ef
1 ファイル変更3 行追加2 行削除
  1. 3 2
      core/hdd/src/wlan_hdd_assoc.c

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

@@ -1327,7 +1327,7 @@ static void hdd_send_association_event(struct net_device *dev,
 	if (eConnectionState_Associated == sta_ctx->conn_info.connState) {
 		tSirSmeChanInfo chan_info = {0};
 
-		if (!pCsrRoamInfo) {
+		if (!pCsrRoamInfo || !pCsrRoamInfo->pBssDesc) {
 			hdd_warn("STA in associated state but pCsrRoamInfo is null");
 			return;
 		}
@@ -2311,7 +2311,8 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
 		hdd_err("Unable to allocate Assoc Req IE");
 		goto done;
 	}
-	if (pCsrRoamInfo == NULL) {
+
+	if (!pCsrRoamInfo || !pCsrRoamInfo->pBssDesc) {
 		hdd_err("Invalid CSR roam info");
 		goto done;
 	}