From 86f65bda6baaff3f877943ac00bc3867543df970 Mon Sep 17 00:00:00 2001 From: 8000ff Date: Fri, 20 Jul 2018 16:20:07 +0200 Subject: Fixed character counting that was shortening paths Change-Id: I16e2f87980229b08426060ec062615d2fa3c1494 Signed-off-by: 8000ff --- ctl-lib/ctl-plugin.c | 4 ++-- 1 file 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); } -- cgit 1.2.3-korg