aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKangjie Lu <kangjielu@gmail.com>2016-05-03 16:44:07 -0400
committerSimon Shields <keepcalm444@gmail.com>2016-05-17 22:11:13 +1000
commit09019d5a21ea44e73c7c850e815d11f26a15b813 (patch)
treea3078fcc8fb779e4c2cb88fd9c0348d0a205eec9 /sound
parent55699ae6f09377fcce9af40f43b4e5e167421958 (diff)
downloadkernel_samsung_smdk4412-09019d5a21ea44e73c7c850e815d11f26a15b813.zip
kernel_samsung_smdk4412-09019d5a21ea44e73c7c850e815d11f26a15b813.tar.gz
kernel_samsung_smdk4412-09019d5a21ea44e73c7c850e815d11f26a15b813.tar.bz2
ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
The stack object “tread” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized. Change-Id: Ibf2868136a538eed0f2e75395a5f14a8608dd86d Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/timer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 9eb25d4..269108a 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1679,6 +1679,7 @@ static int snd_timer_user_params(struct file *file,
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
struct snd_timer_tread tread;
+ memset(&tread, 0, sizeof(tread));
tread.event = SNDRV_TIMER_EVENT_EARLY;
tread.tstamp.tv_sec = 0;
tread.tstamp.tv_nsec = 0;