From cf1975e35ffbca96cb47da38157ffead7f4897d5 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 1 Jul 2017 18:24:02 +0200 Subject: [PATCH] correctly check length of MIDI_SYSEX_TUNING_NOTE_TUNE_BANK fixes #127 --- fluidsynth/src/synth/fluid_synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluidsynth/src/synth/fluid_synth.c b/fluidsynth/src/synth/fluid_synth.c index c77e8d91..4e2813ab 100644 --- a/fluidsynth/src/synth/fluid_synth.c +++ b/fluidsynth/src/synth/fluid_synth.c @@ -1396,7 +1396,7 @@ fluid_synth_sysex_midi_tuning (fluid_synth_t *synth, const char *data, int len, else { if (len < 11 || data[4] & 0x80 || data[5] & 0x80 || data[6] & 0x80 - || len != data[5] * 4 + 7) + || len != data[6] * 4 + 7) return FLUID_OK; bank = *dataptr++;