diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-01-25 15:44:18 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-01-25 17:51:33 +0300 |
commit | 2dee43ec3f31de39dc74e76e6ed65d976f486df0 (patch) | |
tree | 2871302b6f7852d22d766142182464eb8df7d33b /sound/firewire | |
parent | 205d6bcf9bb896903248cd8d600f23cf4d3886d2 (diff) | |
download | linux-2dee43ec3f31de39dc74e76e6ed65d976f486df0.tar.xz |
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: 73f5537fb209 ("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>
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/fireface/ff-protocol-latter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/fireface/ff-protocol-latter.c b/sound/firewire/fireface/ff-protocol-latter.c index 0fbc1950327f..c8236ff89b7f 100644 --- a/sound/firewire/fireface/ff-protocol-latter.c +++ b/sound/firewire/fireface/ff-protocol-latter.c @@ -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) { |