mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
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:
parent
205d6bcf9b
commit
2dee43ec3f
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue