From: Michael Stapelberg Date: Sat, 24 Jul 2010 10:32:03 +0000 (+0200) Subject: Bugfix: Use scalloc to get a null-terminated string X-Git-Tag: 4.0~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a6e7894b11bfda84ff573fa81cd783a498d36517;p=i3%2Fi3 Bugfix: Use scalloc to get a null-terminated string --- 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)); }