From 5e75a8406ed47d8c576bba77a3bb68a5092cd558 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 16 Mar 2020 11:29:14 +0100 Subject: Fix invalid call of memset with length 0 --- src/ModPlugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ModPlugin.cpp') diff --git a/src/ModPlugin.cpp b/src/ModPlugin.cpp index f907ba8..4291a44 100644 --- a/src/ModPlugin.cpp +++ b/src/ModPlugin.cpp @@ -104,7 +104,9 @@ int PipelinedModCodec::process(Buffer* dataIn, Buffer* dataOut) } else { dataOut->setLength(dataIn->getLength()); - memset(dataOut->getData(), 0, dataOut->getLength()); + if (dataOut->getLength() > 0) { + memset(dataOut->getData(), 0, dataOut->getLength()); + } m_ready_to_output_data = true; } -- cgit v1.2.3