1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Duplicate string to circumvent eventual memory corruption.

This commit is contained in:
Steven Schubiger 2009-05-27 21:47:57 +02:00
parent 2e1619d3fe
commit 1df3a35106
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2009-05-27 Steven Schubiger <stsc@member.fsf.org>
* ftp.c (ftp_get_listing): Duplicate the "listing file"
string to avoid memory corruption when FOPEN_EXCL_ERR is
encountered.
2009-05-17 Steven Schubiger <stsc@member.fsf.org>
* progress.c (eta_to_human_short): Fix the remaining hours

View File

@ -1370,8 +1370,9 @@ ftp_get_listing (struct url *u, ccon *con, struct fileinfo **f)
xfree (uf);
DEBUGP ((_("Using %s as listing tmp file.\n"), quote (lf)));
con->target = lf;
con->target = xstrdup (lf);
err = ftp_loop_internal (u, NULL, con);
xfree (con->target);
con->target = old_target;
if (err == RETROK)