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: 73f5537fb2 ("ALSA: fireface: support tx MIDI functionality of Fireface UCX")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Dan Carpenter 2019-01-25 15:44:18 +03:00 committed by Takashi Iwai
parent 205d6bcf9b
commit 2dee43ec3f
1 changed files with 1 additions and 1 deletions

View File

@ -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) {