summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fish/tilde.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fish/tilde.c b/fish/tilde.c
index c599e16f..83aa70d9 100644
--- a/fish/tilde.c
+++ b/fish/tilde.c
@@ -85,7 +85,7 @@ expand_home (const char *append)
home = getenv ("HOME");
if (!home) home = "~";
- len = strlen (home) + (append ? strlen (append) : 0);
+ len = strlen (home) + (append ? strlen (append) : 0) + 1;
str = malloc (len);
if (str == NULL) {
perror ("malloc");