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

Commit a8f3b894 authored by kunleiz's avatar kunleiz Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: qdsp6v2: DAP: Add check to validate param length



Return an error code to ensure length value is valid.

CRs-fixed: 1102987
Change-Id: I6a679d08342d1da58c20b5c3d4e436dd335764ae
Signed-off-by: default avatarkunleiz <kunleiz@codeaurora.org>
parent 0a8e939a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-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.
@@ -1642,6 +1642,7 @@ static int msm_ds2_dap_param_visualizer_control_get(u32 cmd, void *arg)
		ret = 0;
		dolby_data->length = 0;
		pr_err("%s Incorrect VCNB length", __func__);
		return -EINVAL;
	}

	params_length = (2*length + DOLBY_VIS_PARAM_HEADER_SIZE) *