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

Commit 98c03480 authored by Naveen S Nair's avatar Naveen S Nair
Browse files

soc: qcom: add buffer overflow check on AON rx_buffer



Add buffer overflow check while accessing data buffer
received from AON.

Change-Id: I0472a0ad1e6edc3fe8102850fddacd89ceea4959
Signed-off-by: default avatarNaveen S Nair <quic_naveensn@quicinc.com>
parent dc674586
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
 */

#include <linux/delay.h>
@@ -439,6 +440,10 @@ void seb_rx_msg(void *data, int len)
	dev->seb_resp_cmplt = true;
	wake_up(&dev->link_state_wait);
	if (dev->wait_for_resp) {
		if (len > SEB_GLINK_INTENT_SIZE) {
			pr_err("Invalid seb rx buffer length\n");
			return;
		}
		memcpy(dev->rx_buf, data, len);
	} else {
		/* Handle the event received from Slate */