From ee74a932c6f25fc5e28aada4334ace0b9b5e6197 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 12 Nov 2020 16:51:48 +0100 Subject: [PATCH] Zero length Events are illegal This would later trigger an assert() in MidiRingBuffer::read when reading the status-byte, and cause undefined behavior down in optimized builds. It is unsure if this can happen, but it may explain https://marcan.st/paste/LHDXNQ9x.txt --- libs/ardour/ardour/event_ring_buffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ardour/ardour/event_ring_buffer.h b/libs/ardour/ardour/event_ring_buffer.h index 2ccb11dc2d..1d47cbbcbf 100644 --- a/libs/ardour/ardour/event_ring_buffer.h +++ b/libs/ardour/ardour/event_ring_buffer.h @@ -118,7 +118,8 @@ template inline uint32_t EventRingBuffer