Jelajahi Sumber

ALSA: hda - Fix Oops in smart51 parsing in VIA codec

Typical off-by-one thinko.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 14 tahun lalu
induk
melakukan
21d45d2ba9
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      sound/pci/hda/patch_via.c

+ 1 - 1
sound/pci/hda/patch_via.c

@@ -1802,7 +1802,7 @@ static void mangle_smart51(struct hda_codec *codec)
 			for (j = 0; j < nums; j++)
 				if (ins[pins[j]].type < ins[i].type) {
 					memmove(pins + j + 1, pins + j,
-						(nums - j - 1) * sizeof(int));
+						(nums - j) * sizeof(int));
 					break;
 				}
 			pins[j] = i;