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

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

Merge "dsp: q6lsm: Add check for payload buffer" into audio-drivers.lnx.4.0.r3

parents 68fa2946 5a3f308a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2013-2020, Linux Foundation. All rights reserved.
 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
 */
#include <linux/fs.h>
#include <linux/mutex.h>
@@ -235,6 +236,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: