aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2006-12-19 01:13:19 +0000
committerMatthias Andree <matthias.andree@gmx.de>2006-12-19 01:13:19 +0000
commit7471bfb290d4dcd9ff6c618c3974c4cce2f3da6a (patch)
tree23afe2e60723eff601ee3df35f0aa487288b40fc
parent11443d9ff821c47e9eeac8ffe35c4ec87f7098bb (diff)
downloadfetchmail-7471bfb290d4dcd9ff6c618c3974c4cce2f3da6a.tar.gz
fetchmail-7471bfb290d4dcd9ff6c618c3974c4cce2f3da6a.tar.bz2
fetchmail-7471bfb290d4dcd9ff6c618c3974c4cce2f3da6a.zip
* When HOME and FETCHMAILHOME are unset, be sure to copy user database
information, lest it be overwritten later. Patch by Jim Correia. svn path=/branches/BRANCH_6-3/; revision=5001
-rw-r--r--NEWS2
-rw-r--r--env.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 251971ae..ed84f71d 100644
--- a/NEWS
+++ b/NEWS
@@ -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.
diff --git a/env.c b/env.c
index f9a3bf9a..46733f3b 100644
--- a/env.c
+++ b/env.c
@@ -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")))