Ver código fonte

qcacld-3.0: Prevent uninitialized variable access

In lim_gen_link_specific_probe_resp_from_assoc_resp() API the
stack variable status can result in returning uninitialized
value.

Initialize the variable on declaration to avoid unexpected
behavior.

Change-Id: I47ef404979f49211e4d511d02646b51e47b003f1
CRs-Fixed: 3698062
Vinod Kumar Pirla 1 ano atrás
pai
commit
b174733cad
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

+ 1 - 1
core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

@@ -1096,7 +1096,7 @@ lim_gen_link_specific_probe_resp_from_assoc_resp(uint8_t *rx_pkt_info,
 						 uint32_t frame_len,
 						 struct pe_session *session)
 {
-	QDF_STATUS status;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct bss_description *bss;
 	struct scan_cache_entry *scan_entry;
 	struct mlo_partner_info *lim_partner_info;