From 066ae08df391cf923eb0f0022e5182b1a8712a14 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 12 Feb 2021 03:05:31 +0000 Subject: [PATCH] Prevent issues with hosts sending MIDI events where they shouldnt Signed-off-by: falkTX --- source/plugin/carla-lv2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/plugin/carla-lv2.cpp b/source/plugin/carla-lv2.cpp index 8cbb2d4cc..25da27c23 100644 --- a/source/plugin/carla-lv2.cpp +++ b/source/plugin/carla-lv2.cpp @@ -320,6 +320,10 @@ public: if (event->body.type != fURIs.midiEvent) continue; + + // anything past this point assumes plugin with MIDI input + CARLA_SAFE_ASSERT_CONTINUE(fPorts.numMidiIns > 0); + if (event->body.size > 4) continue; if (event->time.frames >= frames)