diff options
author | 8000ff <clementmallejac@gmail.com> | 2018-07-20 16:20:07 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-23 11:42:01 +0000 |
commit | 86f65bda6baaff3f877943ac00bc3867543df970 (patch) | |
tree | 5426aed349db81217191e7c31c253b130aa573d5 | |
parent | e32d98c5d6ec6106b97062a0c57131d4278478ca (diff) |
Fixed character counting that was shortening paths
Change-Id: I16e2f87980229b08426060ec062615d2fa3c1494
Signed-off-by: 8000ff <clementmallejac@gmail.com>
-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); } |