Bug 67484 - Wget segfaults when some URL specified twice
Summary: Wget segfaults when some URL specified twice
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: wget   
(Show other bugs)
Version: 7.3
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-06-26 03:53 UTC by Dmitry Bolkhovityanov
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-07-24 21:20:07 UTC
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 21:20 UTC, Need Real Name
no flags Details | Diff

Description Dmitry Bolkhovityanov 2002-06-26 03:53:52 UTC
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 15:36:48 UTC
Happens with 1.8.2 as well... strage.

Comment 2 Need Real Name 2002-07-24 21:18:49 UTC
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 21:20:03 UTC
Created attachment 66864 [details]
Patch that fixes the problem

Comment 4 Trond Eivind Glomsrxd 2002-07-24 23:24:10 UTC
Thanks, fixed in 1.8.2-3

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