mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Fix segfault when HOME not set on Unix.
[originally from svn r4948]
This commit is contained in:
parent
e83034fe3f
commit
30e94b6a5c
@ -85,6 +85,8 @@ static void make_filename(char *filename, int index, const char *subname)
|
||||
char *home;
|
||||
int len;
|
||||
home = getenv("HOME");
|
||||
if (!home)
|
||||
home="/";
|
||||
strncpy(filename, home, FILENAME_MAX);
|
||||
len = strlen(filename);
|
||||
if (index == INDEX_SESSION) {
|
||||
|
Loading…
Reference in New Issue
Block a user