[ALSA] hda-codec - Fix the array over-range access with stac92hd71bxx codec

Add the check of the array range for dac_nids to prevent the over-range
access.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2008-02-29 14:16:17 +01:00
parent fd6640fa2d
commit 40ac8c4f20
1 changed files with 1 additions and 1 deletions

View 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;