From 326e8eac61c82acc8e1fe59357117c9098724bc7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 20 Oct 2014 22:29:20 +0100 Subject: [PATCH] Reduce effGetEffectName string size needed to 32 --- source/plugin/carla-vst.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/plugin/carla-vst.cpp b/source/plugin/carla-vst.cpp index afbedaa3a..f940098a9 100644 --- a/source/plugin/carla-vst.cpp +++ b/source/plugin/carla-vst.cpp @@ -712,19 +712,19 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t #endif case effGetEffectName: - if (ptr != nullptr) + if (char* const cptr = (char*)ptr) { #ifdef CARLA_PLUGIN_PATCHBAY # ifdef CARLA_PLUGIN_SYNTH - std::strncpy((char*)ptr, "Carla-Patchbay", 64); + std::strncpy(cptr, "Carla-Patchbay", 32); # else - std::strncpy((char*)ptr, "Carla-PatchbayFX", 64); + std::strncpy(cptr, "Carla-PatchbayFX", 32); # endif #else # ifdef CARLA_PLUGIN_SYNTH - std::strncpy((char*)ptr, "Carla-Rack", 64); + std::strncpy(cptr, "Carla-Rack", 32); # else - std::strncpy((char*)ptr, "Carla-RackFX", 64); + std::strncpy(cptr, "Carla-RackFX", 32); # endif #endif return 1;