summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/normal/path.c')
-rw-r--r--src/ipcpd/normal/path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/normal/path.c b/src/ipcpd/normal/path.c
index 08d33347..d9b64968 100644
--- a/src/ipcpd/normal/path.c
+++ b/src/ipcpd/normal/path.c
@@ -38,7 +38,7 @@ char * pathname_create(const char * name)
assert(name);
- tmp = malloc(strlen(name) + strlen(PATH_DELIMITER));
+ tmp = malloc(strlen(name) + strlen(PATH_DELIMITER) + 1);
if (tmp == NULL)
return NULL;
@@ -58,7 +58,7 @@ char * pathname_append(char * pname,
tmp = malloc(strlen(pname) +
strlen(PATH_DELIMITER) +
- strlen(name));
+ strlen(name) + 1);
if (tmp == NULL)
return NULL;