Преглед изворни кода

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 пре 4 година
родитељ
комит
f3c74a6bc4
1 измењених фајлова са 2 додато и 1 уклоњено
  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),
 				   sizeof(struct cdp_rx_indication_ppdu),
 				   0, 0, FALSE);
 				   0, 0, FALSE);
 	if (ppdu_nbuf) {
 	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_mon_populate_cfr_info(pdev, ppdu_info, cdp_rx_ppdu);
 		dp_rx_populate_cdp_indication_ppdu(pdev,
 		dp_rx_populate_cdp_indication_ppdu(pdev,
 						   ppdu_info, cdp_rx_ppdu);
 						   ppdu_info, cdp_rx_ppdu);