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

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
......@@ -293,7 +293,7 @@ static void latter_handle_midi_msg(struct snd_ff *ff, unsigned int offset,
struct snd_rawmidi_substream *substream;
unsigned int len;
if (index > ff->spec->midi_in_ports)
if (index >= ff->spec->midi_in_ports)
return;
switch (data & 0x0000000f) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment