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

[svn] Correctly loop through the linked list.

By Philip Stadermann.
This commit is contained in:
hniksic 2003-10-14 15:52:12 -07:00
parent 92c11002bc
commit 3f6913663e
2 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2003-10-15 Philip Stadermann <philip.stadermann@credativ.de>
* ftp.c (ftp_retrieve_glob): Correctly loop through the list whose
elements might have been deleted.
2003-10-13 Hrvoje Niksic <hniksic@xemacs.org>
* html-url.c (tag_handle_meta): Set the Refresh link to expect

View File

@ -1618,20 +1618,19 @@ has_insecure_name_p (const char *s)
static uerr_t
ftp_retrieve_glob (struct url *u, ccon *con, int action)
{
struct fileinfo *f, *orig, *start;
struct fileinfo *f, *start;
uerr_t res;
con->cmd |= LEAVE_PENDING;
res = ftp_get_listing (u, con, &orig);
res = ftp_get_listing (u, con, &start);
if (res != RETROK)
return res;
start = orig;
/* First: weed out that do not conform the global rules given in
opt.accepts and opt.rejects. */
if (opt.accepts || opt.rejects)
{
f = orig;
f = start;
while (f)
{
if (f->type != FT_DIRECTORY && !acceptable (f->name))
@ -1644,7 +1643,7 @@ ftp_retrieve_glob (struct url *u, ccon *con, int action)
}
}
/* Remove all files with possible harmful names */
f = orig;
f = start;
while (f)
{
if (has_insecure_name_p (f->name))