mirror of
https://github.com/curl/curl.git
synced 2026-07-23 17:17:23 +03:00
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.
This commit is contained in:
parent
d34fe06fb0
commit
7f62028d66
3 changed files with 10 additions and 2 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue