Bug 79736 - wget fails when checking for bad file names
Summary: wget fails when checking for bad file names
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: wget
Version: 7.3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-16 12:41 UTC by Mogens Kjaer
Modified: 2007-04-18 16:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-08-04 11:03:33 UTC

Attachments (Terms of Use)

Description Mogens Kjaer 2002-12-16 12:41:11 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823

Description of problem:
version wget-1.8.2-4.73 fails the check for bad filenames

It worked with the old version of wget, the
one that didn't check for bad filenames.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.wget -m --accept tar "ftp://ftpeur.nai.com/pub/antivirus/datfiles/4.x/"

Actual Results:  ...
Rejecting `42364237.upd'.
Rejecting `dat-4237.zip'.
Rejecting `delta.ini'.
Rejecting `P2104123.z'.
Rejecting `Palm.Ini'.
Rejecting `readme.txt'.
Rejecting `sdat4237.exe'.
Rejecting `update.ini'.
Segmentation fault (core dumped)

Expected Results:  The .tar file in the directory should have
been retrieved.

Additional info:

I looks like that the patch wget-1.8.2-filename.patch
should be change in line 49 from:

+  f = orig;


+  f = start;

If the first loop in ftp_retrieve_glob removes the first
element of the list, orig is no longer valid.

Comment 1 jonny robertson 2002-12-19 02:33:32 UTC
I can confirm this problem (i discovered the same thing using the -r switch).

Program received signal SIGSEGV, Segmentation fault.
0x0804ff00 in ftp_retrieve_glob ()

Problem non-existant in 1.8.1

Comment 2 Karsten Hopp 2002-12-19 14:31:40 UTC
I can't reproduce this. I've installed a fresh 7.3 and upgraded wget to 
the errata version. 
wget -m --passive-ftp --accept tar
finishes without a problem (I had to use passive-ftp due to firewall restrictions,
but that shouldn't matter here)

Comment 3 Mogens Kjaer 2002-12-19 16:33:42 UTC
I think you might have been lucky that the
"orig" pointer points to something useful, when
you try the example.

Note You need to log in before you can comment on or make changes to this bug.