X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxstore.c;h=85d72ca75a96edca8ec9f39ae8c254b9cb485fdc;hb=550f7b37cb7dbe0dcd68d2ac2c3b529e643599b3;hp=c46b9a293e38efc42d82efa75a5572d2e25d84da;hpb=7ecf13564a8d716000ce78146d1aaf4422432a4f;p=PuTTY.git diff --git a/unix/uxstore.c b/unix/uxstore.c index c46b9a29..85d72ca7 100644 --- a/unix/uxstore.c +++ b/unix/uxstore.c @@ -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) {