aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvivek mehta <mvivek@codeaurora.org>2016-07-05 12:51:03 -0700
committerDevin Kim <dojip.kim@lge.com>2016-08-26 12:58:42 -0700
commit8f80827eb17916da385b10eda537d3b4a49da812 (patch)
tree4c3fcd080f698ca0e9878adbd15d85e1d955daab
parent551c6fbf912c83dce473c805a80d27223a231d38 (diff)
ASoC: msm: qdsp6v2: check param length for EAC3 formatandroid-wear-6.0.1_r0.113
Initialize param length with user space argument and check the condition for maximum length in SND_AUDIOCODEC_EAC3 format. BUG 28868303 Change-Id: I1d139a5342c35434651ce617b3a4fd2c231574fb Signed-off-by: vivek mehta <mvivek@codeaurora.org>
-rw-r--r--sound/soc/msm/qdsp6v2/msm-compr-q6-v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-compr-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compr-q6-v2.c
index db285ab4ddda..e9aba43a632e 100644
--- a/sound/soc/msm/qdsp6v2/msm-compr-q6-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-compr-q6-v2.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, 2016 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
@@ -1087,6 +1087,7 @@ static int msm_compr_ioctl_shared(struct snd_pcm_substream *substream,
__func__, ddp->params_length);
return -EINVAL;
}
+ params_length = ddp->params_length*sizeof(int);
if (params_length > MAX_AC3_PARAM_SIZE) {
/*MAX is 36*sizeof(int) this should not happen*/
pr_err("%s: params_length(%d) is greater than %zd\n",