summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/aft.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/aft.c b/src/aft.c
index 76fb6a1..df0c69b 100644
--- a/src/aft.c
+++ b/src/aft.c
@@ -203,12 +203,12 @@ int afbBindingEntry(afb_api_t apiHandle) {
bindingRootDirLen = strlen(bindingRootDir);
if(envDirList) {
- len = strlen(CONTROL_CONFIG_PATH) + strlen(envDirList) + bindingRootDirLen;
+ len = strlen(CONTROL_CONFIG_PATH) + strlen(envDirList) + bindingRootDirLen + 2;
dirList = malloc(len + 1);
- snprintf(dirList, len + 2, "%s:%s:%s", envDirList, bindingRootDir, CONTROL_CONFIG_PATH);
+ snprintf(dirList, len +1, "%s:%s:%s", envDirList, bindingRootDir, CONTROL_CONFIG_PATH);
}
else {
- len = strlen(CONTROL_CONFIG_PATH) + bindingRootDirLen;
+ len = strlen(CONTROL_CONFIG_PATH) + bindingRootDirLen + 1;
dirList = malloc(len + 1);
snprintf(dirList, len + 1, "%s:%s", bindingRootDir, CONTROL_CONFIG_PATH);
}