Toby Peterson patched a memory problem in the command line tool that
authorDaniel Stenberg <daniel@haxx.se>
Thu, 1 Nov 2007 21:49:59 +0000 (21:49 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 1 Nov 2007 21:49:59 +0000 (21:49 +0000)
happened when a user had a home dir as an empty string. curl would then do
free() on a wrong area.

CHANGES
RELEASE-NOTES
src/homedir.c

diff --git a/CHANGES b/CHANGES
index c866fd8..bdca200 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
 
                                   Changelog
 
+Daniel S (1 Nov 2007)
+- Toby Peterson patched a memory problem in the command line tool that
+  happened when a user had a home dir as an empty string. curl would then do
+  free() on a wrong area.
+
 Dan F (1 Nov 2007)
 - Fixed curl-config --features to not display libz when it wasn't used
   due to a missing header file.
index 82cc069..d2d64d9 100644 (file)
@@ -16,6 +16,7 @@ This release includes the following bugfixes:
 
  o curl-config --features and --protocols show the correct output when built
    with NSS, and also when SCP, SFTP and libz are not available
+ o free problem in the curl tool for users with empty home dir
 
 This release includes the following known bugs:
 
@@ -32,6 +33,6 @@ New curl mirrors:
 This release would not have looked like this without help, code, reports and
 advice from friends like these:
 
+ Dan Fandrich, Gisle Vanem, Toby Peterson
  
         Thanks! (and sorry if I forgot to mention someone)
index f27aa69..d9bc39f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -106,6 +106,8 @@ char *homedir(void)
 #endif
      if (home && home[0])
        home = strdup(home);
+     else
+       home = NULL;
    }
  }
 #endif /* PWD-stuff */