diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | env.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -94,6 +94,8 @@ fetchmail 6.3.6 (not yet released): scripts. Should fix Debian Bug#389270, Bug#391698. * Fix crash on systems that do not provide strdup(), the crash then happens in out-of-memory conditions. Patch by Andreas Krennmair. +* When HOME and FETCHMAILHOME are unset, be sure to copy user database + information, lest it be overwritten later. Patch by Jim Correia. # CHANGES: * Remove excess no-op strcpy() after strdup() found by Andreas Krennmair. @@ -108,7 +108,7 @@ void envquery(int argc, char **argv) /* compute user's home directory */ home = getenv("HOME_ETC"); if (!home && !(home = getenv("HOME"))) - home = pwp->pw_dir; + home = xstrdup(pwp->pw_dir); /* compute fetchmail's home directory */ if (!(fmhome = getenv("FETCHMAILHOME"))) |