Commit 2dee43ec authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai
Browse files

ALSA: fireface: Off by one in latter_handle_midi_msg()



The > should be >= or otherwise we potentially read one element beyond
the end of the ff->tx_midi_substreams[] array.

Fixes: 73f5537f ("ALSA: fireface: support tx MIDI functionality of Fireface UCX")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 205d6bcf
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -293,7 +293,7 @@ static void latter_handle_midi_msg(struct snd_ff *ff, unsigned int offset,
	struct snd_rawmidi_substream *substream;
	struct snd_rawmidi_substream *substream;
	unsigned int len;
	unsigned int len;


	if (index > ff->spec->midi_in_ports)
	if (index >= ff->spec->midi_in_ports)
		return;
		return;


	switch (data & 0x0000000f) {
	switch (data & 0x0000000f) {