diff options
| author | Siena Richard <sienar@codeaurora.org> | 2016-08-16 13:03:56 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-18 14:37:57 -0700 |
| commit | 94cae8078094b8aacfbf6282bffd207b05294315 (patch) | |
| tree | a219b7c8c226aa8d2c11290647beacdc0c444592 /drivers/misc | |
| parent | fa0dc60444f8a52470f5ff91db41d8bc09431de8 (diff) | |
misc: qcom: qdsp6v2: initialize wma_config_32
Not all memebers of wma_config_32 are set before they are used which
might lead to invalid values being passed and used. To fix this issue
initialize all member variables of struct wma_config_32 to 0 before
assigning specific values individually.
Change-Id: Ibb082ce691625527e9a9ffd4978dea7ba4df9e84
CRs-Fixed: 1054352
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/qcom/qdsp6v2/audio_wma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/qcom/qdsp6v2/audio_wma.c b/drivers/misc/qcom/qdsp6v2/audio_wma.c index 3d57d38d0fd1..74f678da925a 100644 --- a/drivers/misc/qcom/qdsp6v2/audio_wma.c +++ b/drivers/misc/qcom/qdsp6v2/audio_wma.c @@ -2,7 +2,7 @@ * * Copyright (C) 2008 Google, Inc. * Copyright (C) 2008 HTC Corporation - * Copyright (c) 2009-2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2009-2016, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -166,6 +166,8 @@ static long audio_compat_ioctl(struct file *file, unsigned int cmd, struct msm_audio_wma_config_v2 *wma_config; struct msm_audio_wma_config_v2_32 wma_config_32; + memset(&wma_config_32, 0, sizeof(wma_config_32)); + wma_config = (struct msm_audio_wma_config_v2 *)audio->codec_cfg; wma_config_32.format_tag = wma_config->format_tag; wma_config_32.numchannels = wma_config->numchannels; |
