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

Commit ab5cc61c authored by Asish Bhattacharya's avatar Asish Bhattacharya
Browse files

msm: qdsp5: memset stack buffer allocation.



This is needed to avoid garbage data in uninitialized variables.

Change-Id: I4f5f72b21af81655a0dc791a5d7d19866855e121
CRs-Fixed: 554300
Signed-off-by: default avatarAsish Bhattacharya <asishb@codeaurora.org>
parent ebadb15f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 *
 * Copyright (C) 2008 Google, Inc.
 * Copyright (C) 2008 HTC Corporation
 * Copyright (c) 2009, The Linux Foundation. All rights reserved.
 * Copyright (c) 2009,2013 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
@@ -571,6 +571,7 @@ static long audio_in_ioctl(struct file *file,

	if (cmd == AUDIO_GET_STATS) {
		struct msm_audio_stats stats;
		memset(&stats, 0, sizeof(stats));
		stats.byte_count = atomic_read(&audio->in_bytes);
		if (copy_to_user((void *) arg, &stats, sizeof(stats)))
			return -EFAULT;