소스 검색

qcacld-3.0: Avoid uninitialized use of variable

In send sta authorized event api, there is a possibility
of use of uninitialized use of structure variable mask
which may result in an invalid value of the mask.

To avoid uninitialized use of the structure variable,
mem set structure variable to zero before using it.

Change-Id: I2c8bbac949b55fd18928c5dca8744147b0a45415
CRs-Fixed: 2423878
Ashish Kumar Dhanotiya 5 년 전
부모
커밋
0dd9b8b56a
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 2 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -14562,6 +14562,8 @@ QDF_STATUS wlan_hdd_send_sta_authorized_event(
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	qdf_mem_zero(&sta_flags, sizeof(sta_flags));
+
 	sta_flags.mask |= BIT(NL80211_STA_FLAG_AUTHORIZED);
 	sta_flags.set = true;