diff options
-rw-r--r-- | ctl-lib/ctl-plugin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ctl-lib/ctl-plugin.c b/ctl-lib/ctl-plugin.c index bdcdb16..182b34f 100644 --- a/ctl-lib/ctl-plugin.c +++ b/ctl-lib/ctl-plugin.c @@ -255,12 +255,12 @@ char *GetDefaultPluginSearchPath(AFB_ApiT apiHandle, const char *prefix) * between bindingPath and envDirList concatenation. */ if(envDirList) { - envDirList_len = strlen(CONTROL_PLUGIN_PATH) + strlen(envDirList) + bindingPath_len; + envDirList_len = strlen(CONTROL_PLUGIN_PATH) + strlen(envDirList) + bindingPath_len + 2; searchPath = malloc(envDirList_len + 1); snprintf(searchPath, envDirList_len + 1, "%s:%s:%s", bindingPath, envDirList, CONTROL_PLUGIN_PATH); } else { - envDirList_len = strlen(CONTROL_PLUGIN_PATH) + bindingPath_len; + envDirList_len = strlen(CONTROL_PLUGIN_PATH) + bindingPath_len + 1; searchPath = malloc(envDirList_len + 1); snprintf(searchPath, envDirList_len + 1, "%s:%s", bindingPath, CONTROL_PLUGIN_PATH); } |