diff options
author | Kangjie Lu <kangjielu@gmail.com> | 2016-05-03 16:44:07 -0400 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2016-06-24 21:19:02 +0000 |
commit | 14dfd8269605b9dc3dcdd10945398d3822f07953 (patch) | |
tree | 5452dd8be4c3084282dd51328175755ce58cec17 /sound | |
parent | b40d9bcad6420669ccf41f69278506125fa68428 (diff) |
UPSTREAM: ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
(cherry pick from commit cec8f96e49d9be372fdb0c3836dcf31ec71e457e)
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.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Bug: 28980557
Change-Id: Ibda2d126f6d72fedf797a98796c3cde7bb03db76
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/timer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 8b06413e967e..8b6c3605d2e9 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1680,6 +1680,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; |