gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit fa805008879208b3e5ad40bd8ffb7c7367306364
parent 0fc92c6cce58a6ea007c17266779f15cb37b22ef
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Tue, 18 Jan 2022 20:32:58 +0100

do not crash if an invalid sysex message reaches the microcontroller

Diffstat:
Msource/virusLib/microcontroller.cpp | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/source/virusLib/microcontroller.cpp b/source/virusLib/microcontroller.cpp @@ -235,6 +235,9 @@ bool Microcontroller::sendMIDI(const SMidiEvent& _ev, bool cancelIfFull/* = fals bool Microcontroller::sendSysex(const std::vector<uint8_t>& _data, bool _cancelIfFull, std::vector<SMidiEvent>& _responses, const MidiEventSource _source) { + if (_data.size() < 7) + return true; // invalid sysex or not directed to us + const auto manufacturerA = _data[1]; const auto manufacturerB = _data[2]; const auto manufacturerC = _data[3];