mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
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: Naveen S Nair <quic_naveensn@quicinc.com>
This commit is contained in:
parent
dc674586ed
commit
98c03480ec
1 changed files with 5 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// 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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue