summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-10-16 10:44:25 +0200
committerTakashi Iwai <tiwai@suse.de>2013-10-16 11:22:46 +0200
commitd14df339c72b6efbba4eddd1d1f3f4b173273f74 (patch)
tree5de75c8d0a9480f3fedcda733f4e3533b52aceb1 /sound
parentALSA: us122l: Fix pcm_usb_stream mmapping regression (diff)
downloadlinux-d14df339c72b6efbba4eddd1d1f3f4b173273f74.tar.xz
linux-d14df339c72b6efbba4eddd1d1f3f4b173273f74.zip
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.c1
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))))