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

Commit 3162ed5f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "icnss2: Add data length validation in cnss_wlfw_qdss_data_send_sync()"...

Merge "icnss2: Add data length validation in cnss_wlfw_qdss_data_send_sync()" into kernel.lnx.4.19.r23-rel
parents afda5df0 c090ab30
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/*
/*
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 */
 */


#define pr_fmt(fmt) "icnss2_qmi: " fmt
#define pr_fmt(fmt) "icnss2_qmi: " fmt
@@ -971,8 +972,8 @@ int icnss_wlfw_qdss_data_send_sync(struct icnss_priv *priv, char *file_name,
		     resp->total_size == total_size)
		     resp->total_size == total_size)
		    && (resp->seg_id_valid == 1 && resp->seg_id == req->seg_id)
		    && (resp->seg_id_valid == 1 && resp->seg_id == req->seg_id)
		    && (resp->data_valid == 1 &&
		    && (resp->data_valid == 1 &&
		resp->data_len <= QMI_WLFW_MAX_DATA_SIZE_V01)) {
			resp->data_len <= QMI_WLFW_MAX_DATA_SIZE_V01)

		    && resp->data_len <= remaining) {
			memcpy(p_qdss_trace_data_temp,
			memcpy(p_qdss_trace_data_temp,
			       resp->data, resp->data_len);
			       resp->data, resp->data_len);
		} else {
		} else {