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

Commit 94b8281c authored by Asish Bhattacharya's avatar Asish Bhattacharya
Browse files

msm: qdsp: memset stack buffer allocation.



This is needed to avoid garbage data in uninitialized variables.

Change-Id: I456be431ee2e22fa5cd5fd2951d7079e177e3646
CRs-Fixed: 553262
Signed-off-by: default avatarAsish Bhattacharya <asishb@codeaurora.org>
parent c59298c1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 *
 * aac audio input device
 *
 * Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
 *
 * This code is based in part on arch/arm/mach-msm/qdsp5v2/audio_aac_in.c,
 * Copyright (C) 2008 Google, Inc.
@@ -770,6 +770,7 @@ static long audaac_in_ioctl(struct file *file,
	MM_DBG("\n");
	if (cmd == AUDIO_GET_STATS) {
		struct msm_audio_stats stats;
		memset(&stats, 0, sizeof(stats));
		stats.byte_count = atomic_read(&audio->in_bytes);
		stats.sample_count = atomic_read(&audio->in_samples);
		if (copy_to_user((void *) arg, &stats, sizeof(stats)))
+2 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 *
 * Copyright (C) 2008 Google, Inc.
 * Copyright (C) 2008 HTC Corporation
 * Copyright (c) 2009-2012, 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
@@ -778,6 +778,7 @@ static long audaac_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);
		stats.sample_count = atomic_read(&audio->in_samples);
		if (copy_to_user((void *) arg, &stats, sizeof(stats)))