From 41923e441305728ba3640e773e55d16e4769145c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 22 Oct 2007 17:20:10 +0200 Subject: [ALSA] hda-codec - Fix possible array overflow dac_nids arrays in each codec support code may have up to 5 items when assigned from the auto-configurator. Some codec codes have less numbers than the possible max. This patch defines the constant and fixes the array definitions. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/hda/patch_via.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci/hda/patch_via.c') diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 33b5e1ffa817..4cdf3e6df4ba 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -114,7 +114,7 @@ struct via_spec { unsigned int num_kctl_alloc, num_kctl_used; struct snd_kcontrol_new *kctl_alloc; struct hda_input_mux private_imux; - hda_nid_t private_dac_nids[4]; + hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; #ifdef CONFIG_SND_HDA_POWER_SAVE struct hda_loopback_check loopback; -- cgit v1.2.3-59-g8ed1b