]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[ALSA] emu10k1 - Fix memory corruption
authorTakashi Iwai <tiwai@suse.de>
Thu, 16 Aug 2007 17:32:16 +0000 (19:32 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Oct 2007 13:59:13 +0000 (15:59 +0200)
The number of mixer elements for SPDIF control don't match with the
actual array size (3).  This may result in a memory corruption that
overwrites the i2c_capture_source field (ALSA bug#3095).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/emu10k1/emumixer.c

index 692b871bff570422737185b85ef39134499784b2..71ad5a038e811970bc724a0dd3780df5b86b0277 100644 (file)
@@ -896,7 +896,7 @@ static struct snd_kcontrol_new snd_emu10k1_spdif_mask_control =
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
-       .count =        4,
+       .count =        3,
        .info =         snd_emu10k1_spdif_info,
        .get =          snd_emu10k1_spdif_get_mask
 };
@@ -905,7 +905,7 @@ static struct snd_kcontrol_new snd_emu10k1_spdif_control =
 {
        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
-       .count =        4,
+       .count =        3,
        .info =         snd_emu10k1_spdif_info,
        .get =          snd_emu10k1_spdif_get,
        .put =          snd_emu10k1_spdif_put