]> err.no Git - linux-2.6/commitdiff
[ALSA] hda-codec - Fix the array over-range access with stac92hd71bxx codec
authorTakashi Iwai <tiwai@suse.de>
Fri, 29 Feb 2008 13:16:17 +0000 (14:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:00:20 +0000 (12:00 +0200)
Add the check of the array range for dac_nids to prevent the over-range
access.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_sigmatel.c

index f6c02c0b1f8dfac98807b02916efc2d8dc70b1af..6c85e7e81034fc95dda719f3fd4830a8f79686cf 100644 (file)
@@ -2363,7 +2363,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
        unsigned int wid_caps, pincap;
 
 
-       for (i = 0; i < cfg->line_outs; i++) {
+       for (i = 0; i < cfg->line_outs && i < spec->multiout.num_dacs; i++) {
                if (!spec->multiout.dac_nids[i])
                        continue;