From 429da16b608fe9e87971797290c24f67cc112b2b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 5 Feb 2015 17:37:17 -0500 Subject: Fix sending out of bounds events to LV2 plugins. --- libs/ardour/lv2_plugin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 5a97bfa41f..7f744be3d6 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -2012,7 +2012,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs, LV2_Evbuf* buf = _ev_buffers[msg.index]; LV2_Evbuf_Iterator i = lv2_evbuf_end(buf); const LV2_Atom* const atom = (const LV2_Atom*)&body[0]; - if (!lv2_evbuf_write(&i, nframes, 0, atom->type, atom->size, + if (!lv2_evbuf_write(&i, nframes - 1, 0, atom->type, atom->size, (const uint8_t*)(atom + 1))) { error << "Failed to write data to LV2 event buffer\n"; } -- cgit v1.2.3