zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 7f453c5f52b780d1f0c1105def09ee9789ed884a
parent b4bb7ddb95daa3e43854c6fcb97dcf7e110d23ef
Author: fundamental <[email protected]>
Date:   Thu, 21 Jul 2016 13:50:44 -0400

Add Sanity Check For Sending OSC

Diffstat:
Msrc/Misc/MiddleWare.cpp | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp @@ -1539,6 +1539,11 @@ void MiddleWareImpl::broadcastToRemote(const char *rtmsg) void MiddleWareImpl::sendToRemote(const char *rtmsg, std::string dest) { + if(!rtmsg || rtmsg[0] != '/' || !rtosc_message_length(rtmsg, -1)) { + printf("[Warning] Invalid message in sendToRemote <%s>...\n", rtmsg); + return; + } + //printf("sendToRemote(%s:%s,%s)\n", rtmsg, rtosc_argument_string(rtmsg), // dest.c_str()); if(dest == "GUI") {