Răsfoiți Sursa

qcacld-3.0: Avoid NULL pointer dereferencing of mpdu_buf

Avoid NULL pointer dereferencing of mpdu_buf by putting NULL
check before using it in htt_rx_restitch_mpdu_from_msdus func.

Change-Id: I726891d4fc1f6928cbda911932dbbcd2ec681b63
CRs-Fixed: 2008901
Himanshu Agarwal 8 ani în urmă
părinte
comite
d4fe5f748f
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      core/dp/htt/htt_rx.c

+ 3 - 0
core/dp/htt/htt_rx.c

@@ -2223,6 +2223,9 @@ htt_rx_restitch_mpdu_from_msdus(htt_pdev_handle pdev,
 		else
 			mpdu_buf = qdf_nbuf_clone(head_msdu);
 
+		if (!mpdu_buf)
+			goto mpdu_stitch_fail;
+
 		prev_buf = mpdu_buf;
 
 		frag_list_sum_len = 0;