Bug 67484 - Wget segfaults when some URL specified twice
Wget segfaults when some URL specified twice
Product: Red Hat Linux
Classification: Retired
Component: wget (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Depends On:
  Show dependency treegraph
Reported: 2002-06-25 23:53 EDT by Dmitry Bolkhovityanov
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-07-24 17:20:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch that fixes the problem (687 bytes, patch)
2002-07-24 17:20 EDT, Need Real Name
no flags Details | Diff

  None (edit)
Description Dmitry Bolkhovityanov 2002-06-25 23:53:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408

Description of problem:
I wanted to download a part of www.finescale.com, so did wget with "-np" switch,
but since some images were out of that tree, I also specified them in
commandline separately.  And wget segfaulted.  I've narrowed the problem down,
and it turned out to be "URL duplication".  (Yes, I made a mistake by specifying
that .gif twice, but wget shouldn't segfault anyway.)

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

How reproducible:

Steps to Reproduce:
1. wget -cdkrt0 -l0 -np http://www.finescale.com/fsm/images/RedReturn.gif

Actual Results:  zsh: segmentation fault  wget -cdkrt0 -l0 -np

Expected Results:  There should be no segfault.

Additional info:

If the .gif is simply specified twice (RedReturn.gif RedReturn.gif), there's no
problem.  But if these two instance are separated with another URL, the segfault
Comment 1 Trond Eivind Glomsrxd 2002-06-27 11:36:48 EDT
Happens with 1.8.2 as well... strage.
Comment 2 Need Real Name 2002-07-24 17:18:49 EDT
The problem is actually fairly simple -- a hash table is used without first
checking if it's non-NULL.  You only see the problem if you specify a URL twice
*and* don't download a single HTML file.  That's why the bug went unnoticed.

I'm about to attach a patch that fixes the problem.
Comment 3 Need Real Name 2002-07-24 17:20:03 EDT
Created attachment 66864 [details]
Patch that fixes the problem
Comment 4 Trond Eivind Glomsrxd 2002-07-24 19:24:10 EDT
Thanks, fixed in 1.8.2-3

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