fish: Fix too-short allocation in tilde expansion (RHBZ#636061).

This commit is contained in:
Karel Klíč
2010-10-25 12:48:36 +01:00
committed by Richard W.M. Jones
parent 247324a4b3
commit 1d5ec10659

View File

@@ -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");