From a6e7894b11bfda84ff573fa81cd783a498d36517 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 24 Jul 2010 12:32:03 +0200 Subject: [PATCH] Bugfix: Use scalloc to get a null-terminated string --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index fa4a6042..6d5f57f1 100644 --- a/src/config.c +++ b/src/config.c @@ -59,7 +59,7 @@ char *resolve_tilde(const char *path) { } else { head = globbuf.gl_pathv[0]; - result = smalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1); + result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1); strncpy(result, head, strlen(head)); strncat(result, tail, strlen(tail)); }