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. b/28980557 Git-commit: cec8f96e49d9be372fdb0c3836dcf31ec71e457e Git-repo: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org> (cherry picked from commit cec8f96e49d9be372fdb0c3836dcf31ec71e457e) Change-Id: I3b42ee147fd0883696f9783f0a38d5bef888a10a
This commit is contained in:
parent
c6855ffd7f
commit
33618e19f9
1 changed files with 1 additions and 0 deletions
|
@ -1746,6 +1746,7 @@ static int snd_timer_user_params(struct file *file,
|
||||||
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
|
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
|
||||||
if (tu->tread) {
|
if (tu->tread) {
|
||||||
struct snd_timer_tread tread;
|
struct snd_timer_tread tread;
|
||||||
|
memset(&tread, 0, sizeof(tread));
|
||||||
tread.event = SNDRV_TIMER_EVENT_EARLY;
|
tread.event = SNDRV_TIMER_EVENT_EARLY;
|
||||||
tread.tstamp.tv_sec = 0;
|
tread.tstamp.tv_sec = 0;
|
||||||
tread.tstamp.tv_nsec = 0;
|
tread.tstamp.tv_nsec = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue