Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2e18a75 authored by Amar Singhal's avatar Amar Singhal Committed by nshrivas
Browse files

qcacmn: Validate the network buffer before processing

Check for potential buffer overflow and NULL ptr access
issues.

Change-Id: Iecb36530716dafa27a95a82392e97f662a7c25f0
CRs-Fixed: 2251345
parent 8051cd1d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1940,7 +1940,9 @@ void qdf_dp_trace_data_pkt(qdf_nbuf_t nbuf,
	if (qdf_dp_enable_check(nbuf, code, dir) == false)
		return;

	qdf_dp_add_record(code, qdf_nbuf_data(nbuf), nbuf->len - nbuf->data_len,
	qdf_dp_add_record(code,
			  nbuf ? qdf_nbuf_data(nbuf) : NULL,
			  nbuf ? nbuf->len - nbuf->data_len : 0,
			  (uint8_t *)&buf, sizeof(struct qdf_dp_trace_data_buf),
			  (nbuf) ? QDF_NBUF_CB_DP_TRACE_PRINT(nbuf)
			  : false);