mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fish: Fix too-short allocation in tilde expansion (RHBZ#636061).
This commit is contained in:
committed by
Richard W.M. Jones
parent
247324a4b3
commit
1d5ec10659
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user