Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40ac8c4f authored by Takashi Iwai's avatar Takashi Iwai
Browse files

[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: default avatarTakashi Iwai <tiwai@suse.de>
parent fd6640fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;