mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
dsp: q6lsm: Add check for payload buffer
Check get_param_payload buffer ptr before accessing. Change-Id: I5470983188dffeec14965a5cdec30747b98735e7 Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
This commit is contained in:
parent
5423d9ef23
commit
01db7bcebc
1 changed files with 6 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2013-2021, Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#include <linux/fs.h>
|
||||
#include <linux/mutex.h>
|
||||
|
|
@ -241,6 +242,11 @@ static int q6lsm_callback(struct apr_client_data *data, void *priv)
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (!client->get_param_payload) {
|
||||
pr_err("%s: invalid get_param_payload buffer ptr\n", __func__);
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
memcpy((u8 *)client->get_param_payload,
|
||||
(u8 *)payload + payload_min_size_expected, param_size);
|
||||
done:
|
||||
|
|
|
|||
Loading…
Reference in a new issue