summaryrefslogtreecommitdiffstats
path: root/sound/firewire
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-01-25 13:44:18 +0100
committerTakashi Iwai <tiwai@suse.de>2019-01-25 15:51:33 +0100
commit2dee43ec3f31de39dc74e76e6ed65d976f486df0 (patch)
tree2871302b6f7852d22d766142182464eb8df7d33b /sound/firewire
parentMerge branch 'topic/pcm-lock-refactor' into for-next (diff)
downloadlinux-2dee43ec3f31de39dc74e76e6ed65d976f486df0.tar.xz
linux-2dee43ec3f31de39dc74e76e6ed65d976f486df0.zip
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.c2
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) {