Explorar o código

qcacmn: Memset struct cdp_rx_indication_ppdu to zero

To avoid reading junk values, memset struct cdp_rx_indication_ppdu to zero.

Change-Id: I9216eb0bbf2f0befbcd67d2a5d400e70ed058851
CRs-Fixed: 2940690
Amir Patel %!s(int64=4) %!d(string=hai) anos
pai
achega
f3c74a6bc4
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      dp/wifi3.0/dp_rx_mon_status.c

+ 2 - 1
dp/wifi3.0/dp_rx_mon_status.c

@@ -1509,8 +1509,9 @@ dp_rx_handle_ppdu_stats(struct dp_soc *soc, struct dp_pdev *pdev,
 				   sizeof(struct cdp_rx_indication_ppdu),
 				   0, 0, FALSE);
 	if (ppdu_nbuf) {
-		cdp_rx_ppdu = (struct cdp_rx_indication_ppdu *)ppdu_nbuf->data;
+		cdp_rx_ppdu = (struct cdp_rx_indication_ppdu *)qdf_nbuf_data(ppdu_nbuf);
 
+		qdf_mem_zero(cdp_rx_ppdu, sizeof(struct cdp_rx_indication_ppdu));
 		dp_rx_mon_populate_cfr_info(pdev, ppdu_info, cdp_rx_ppdu);
 		dp_rx_populate_cdp_indication_ppdu(pdev,
 						   ppdu_info, cdp_rx_ppdu);