sound fixes
Subsystems (2)
Linus,
please pull another ALSA fixes for v2.6.31-rc4 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus
containing only the following trivial patches.
Thanks!
Takashi
===
Julia Lawall (1):
ALSA: sound/aoa: Add kmalloc NULL tests
Roel Kluin (3):
ALSA: hda: fix out-of-bound hdmi_eld.sad[] write
sound: aedsp16: Buffer overflow
sound: mpu401.c: Buffer overflow
Takashi Iwai (2):
ALSA: hda - Add quirk for Dell Studio 1555
ALSA: hda - Increase PCM stream name buf in patch_realtek.c
--- sound/aoa/core/gpio-pmf.c | 4 ++++ sound/oss/aedsp16.c | 9 +++++---- sound/oss/mpu401.c | 2 +- sound/pci/hda/hda_eld.c | 4 ++-- sound/pci/hda/patch_realtek.c | 4 ++-- sound/pci/hda/patch_sigmatel.c | 2 ++ 6 files changed, 16 insertions(+), 9 deletions(-)
sound/aoa/core/gpio-pmf.c +4 -0
@@ -182,6 +182,10 @@ static int pmf_set_notify(struct gpio_runtime *rt,if (!old && notify) { irq_client =kzalloc (sizeof (struct pmf_irq_client ),GFP_KERNEL ); +if (!irq_client) { + err = -ENOMEM ; + goto out_unlock; + } irq_client->data = notif; irq_client->handler = pmf_handle_notify_irq; irq_client->owner =THIS_MODULE ;
sound/oss/aedsp16.c +5 -4
@@ -325,8 +325,9 @@/* * Size of character arrays that store name and version of sound card */ -#define CARDNAMELEN 15/* Size of the card's name in chars */ -#define CARDVERLEN 2/* Size of the card's version in chars */ +#define CARDNAMELEN 15/* Size of the card's name in chars */ +#define CARDVERLEN 10/* Size of the card's version in chars */ +#define CARDVERDIGITS 2/* Number of digits in the version */ #if defined(CONFIG_SC6600 )/*
@@ -410,7 +411,7 @@static int soft_cfg__initdata =0 ;/* bitmapped config */ static int soft_cfg_mss__initdata =0 ;/* bitmapped mss config */ -static int ver[CARDVERLEN ]__initdata = {0 ,0 };/* DSP Ver: +static int ver[CARDVERDIGITS ]__initdata = {0 ,0 };/* DSP Ver: hi->ver[0] lo->ver[1] */ #if defined(CONFIG_SC6600 )
@@ -957,7 +958,7 @@ static int __init aedsp16_dsp_version(int port)* string is finished. */ ver[len++] = ret; - }while (len <CARDVERLEN ); + }while (len <CARDVERDIGITS );sprintf (DSPVersion,"%d.%d" , ver[0 ], ver[1 ]);DBG (("success.\n" ));
sound/oss/mpu401.c +1 -1
@@ -1074,7 +1074,7 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner)sprintf (mpu_synth_info[m].name,"%s (MPU401)" , hw_config->name); else sprintf(mpu_synth_info[m].name, -"MPU-401 %d.%d%c Midi interface #%d" , +"MPU-401 %d.%d%c MIDI #%d" , (int ) (devc->version &0xf0 ) >>4 , devc->version &0x0f , revision_char,
sound/pci/hda/hda_eld.c +2 -2
@@ -508,7 +508,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry,char name[64 ];char *sname;long long val; -int n; +unsigned int n;while (!snd_info_get_line (buffer, line,sizeof (line))) {if (sscanf (line,"%s %llx" , name, &val) !=2 )
@@ -539,7 +539,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry, sname++; n =10 * n + name[4 ] -'0' ; } -if (n <0 || n >31 )/* double the CEA limit */ +if (n >=ELD_MAX_SAD )continue ;if (!strcmp (sname,"_coding_type" )) e->sad[n].format = val;
sound/pci/hda/patch_realtek.c +2 -2
@@ -275,13 +275,13 @@ struct alc_spec {*/ unsigned int num_init_verbs; -char stream_name_analog[16 ];/* analog PCM stream */ +char stream_name_analog[32 ];/* analog PCM stream */ struct hda_pcm_stream *stream_analog_playback;struct hda_pcm_stream *stream_analog_capture;struct hda_pcm_stream *stream_analog_alt_playback;struct hda_pcm_stream *stream_analog_alt_capture; -char stream_name_digital[16 ];/* digital PCM stream */ +char stream_name_digital[32 ];/* digital PCM stream */ struct hda_pcm_stream *stream_digital_playback;struct hda_pcm_stream *stream_digital_capture;
sound/pci/hda/patch_sigmatel.c +2 -0
@@ -1809,6 +1809,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { "Dell Studio 1537", STAC_DELL_M6_DMIC), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0, "Dell Studio 17", STAC_DELL_M6_DMIC), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, + "Dell Studio 1555", STAC_DELL_M6_DMIC), {}/* terminator */ };