Skip to content

Commit

Permalink
[ALSA] hda-codec - Fix the array over-range access with stac92hd71bxx…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Takashi Iwai committed Apr 24, 2008
1 parent fd6640f commit 40ac8c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 40ac8c4

Please sign in to comment.