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

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

Merge "ASOC: msm: Restrict loop index to avoid buffer overread"

parents ab2c4de2 779616f3
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014, 2016-2017,The Linux Foundation. All rights reserved.
/*
* Copyright (c) 2013-2014, 2016-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
@@ -816,6 +818,10 @@ int msm_dolby_dap_param_to_get_control_get(struct snd_kcontrol *kcontrol,
			 __func__, copp_idx);
		return -EINVAL;
	}
	if (dolby_dap_params_get.length > 128 - DOLBY_PARAM_PAYLOAD_SIZE) {
		pr_err("%s: Incorrect parameter length", __func__);
		return -EINVAL;
	}
	params_value = kzalloc(params_length + param_payload_len, GFP_KERNEL);
	if (!params_value) {
		pr_err("%s, params memory alloc failed\n", __func__);