qcacmn: Validate the network buffer before processing

Check for potential buffer overflow and NULL ptr access
issues.

Change-Id: Iecb36530716dafa27a95a82392e97f662a7c25f0
CRs-Fixed: 2251345
This commit is contained in:
Amar Singhal
2018-05-18 16:09:47 -07:00
committed by nshrivas
parent d4a55e0c77
commit f98d926bcf

View File

@@ -1890,7 +1890,8 @@ void qdf_dp_trace_data_pkt(qdf_nbuf_t nbuf, uint8_t pdev_id,
return;
qdf_dp_add_record(code, pdev_id,
qdf_nbuf_data(nbuf), nbuf->len - nbuf->data_len,
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);
}