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

Commit 3bd511de authored by Siena Richard's avatar Siena Richard Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarSiena Richard <sienar@codeaurora.org>
parent a19f5688
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;