diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-10-16 11:44:25 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-16 11:22:46 +0200 |
commit | d14df339c72b6efbba4eddd1d1f3f4b173273f74 (patch) | |
tree | 5de75c8d0a9480f3fedcda733f4e3533b52aceb1 /sound | |
parent | ac536a848a1643e4b87e8fbd376a63091afc2ccc (diff) |
ALSA: hdsp - info leak in snd_hdsp_hwdep_ioctl()
In GCC the sizeof(hdsp_version) is 8 because there is a 2 byte hole at
the end of the struct after ->firmware_rev.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 4f255dfee450..f59a321a6d6a 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c @@ -4845,6 +4845,7 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne if ((err = hdsp_get_iobox_version(hdsp)) < 0) return err; } + memset(&hdsp_version, 0, sizeof(hdsp_version)); hdsp_version.io_type = hdsp->io_type; hdsp_version.firmware_rev = hdsp->firmware_rev; if ((err = copy_to_user(argp, &hdsp_version, sizeof(hdsp_version)))) |