mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-20 21:34:24 -05:00
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
|
From 744330f4e5d70dce71c4c9e03c5b6a8b59bb0cda Mon Sep 17 00:00:00 2001
|
||
|
From: Siena Richard <sienar@codeaurora.org>
|
||
|
Date: Tue, 16 Aug 2016 13:03:56 -0700
|
||
|
Subject: 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>
|
||
|
---
|
||
|
drivers/misc/qcom/qdsp6v2/audio_wma.c | 2 ++
|
||
|
1 file changed, 2 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/misc/qcom/qdsp6v2/audio_wma.c b/drivers/misc/qcom/qdsp6v2/audio_wma.c
|
||
|
index 9877937..cb5a9b1 100644
|
||
|
--- a/drivers/misc/qcom/qdsp6v2/audio_wma.c
|
||
|
+++ b/drivers/misc/qcom/qdsp6v2/audio_wma.c
|
||
|
@@ -162,6 +162,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;
|
||
|
--
|
||
|
cgit v1.1
|
||
|
|