From b99037eae6a7af058cdb56f316d9c8e4ca603d86 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 1 Dec 2016 11:15:41 +0100 Subject: ipcpd: normal: Address review comments This addresses some comments after a code review by Dimitri. --- src/ipcpd/normal/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/normal/path.c') 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; -- cgit v1.2.3