Browse Source

Check for end of client name in path

Otherwise a path like /Carlaz0/... works.

Signed-off-by: Asahi Lina <lina@asahilina.net>
pull/2011/head
Asahi Lina 3 months ago
parent
commit
f74e17706d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      source/backend/engine/CarlaEngineOscHandlers.cpp

+ 2
- 1
source/backend/engine/CarlaEngineOscHandlers.cpp View File

@@ -87,7 +87,8 @@ int CarlaEngineOsc::handleMessage(const bool isTCP, const char* const path,
{ {
bytesAfterName = fName.length(); bytesAfterName = fName.length();


if (std::strlen(path) <= bytesAfterName || std::strncmp(path+1, fName, bytesAfterName) != 0)
if (std::strlen(path) <= bytesAfterName || std::strncmp(path+1, fName, bytesAfterName) != 0 ||
path[bytesAfterName+1] != '/')
{ {
carla_stderr("CarlaEngineOsc::handleMessage() - message not for this client -> '%s' != '/%s/'", carla_stderr("CarlaEngineOsc::handleMessage() - message not for this client -> '%s' != '/%s/'",
path, fName.buffer()); path, fName.buffer());


Loading…
Cancel
Save