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

Commit 470d1d46 authored by Fred Oh's avatar Fred Oh
Browse files

qdsp5: audio: Initialize local variable stats



If uninitialzied structure is passed from kernel to user space, it
may contain contain sensitive information that will be leaked.

Change-Id: I232c5af50a2e8c98d76739578535327a781e1bb2
Signed-off-by: default avatarFred Oh <fred@codeaurora.org>
parent 0d6eafbe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -802,6 +802,7 @@ static long audamrnb_ioctl(struct file *file, unsigned int cmd,

	if (cmd == AUDIO_GET_STATS) {
		struct msm_audio_stats stats;
		memset(&stats, 0, sizeof(struct msm_audio_stats));
		stats.byte_count = audpp_avsync_byte_count(audio->dec_id);
		stats.sample_count = audpp_avsync_sample_count(audio->dec_id);
		if (copy_to_user((void *)arg, &stats, sizeof(stats)))