From 0efab3319dddf1cf308e7476b7cd28f350faa917 Mon Sep 17 00:00:00 2001
From: Matt Kraai
Date: Tue, 19 Mar 2002 15:22:42 +0000
Subject: * networking/wget.c (parse_url): Allocate a string for the empty
 path. * testsuite/wget/wget-handles-empty-path: New.

---
 networking/wget.c                      | 4 ++--
 testsuite/wget/wget-handles-empty-path | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 testsuite/wget/wget-handles-empty-path

diff --git a/networking/wget.c b/networking/wget.c
index 41b4e30..505c3f2 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -533,7 +533,7 @@ void parse_url(char *url, struct host_info *h)
 		*sp++ = '\0';
 		h->path = sp;
 	} else
-		h->path = "";
+		h->path = xstrdup("");
 
 	up = strrchr(h->host, '@');
 	if (up != NULL) {
@@ -817,7 +817,7 @@ progressmeter(int flag)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$Id: wget.c,v 1.46 2001/10/24 04:59:56 andersen Exp $
+ *	$Id: wget.c,v 1.47 2002/03/19 15:22:40 kraai Exp $
  */
 
 
diff --git a/testsuite/wget/wget-handles-empty-path b/testsuite/wget/wget-handles-empty-path
new file mode 100644
index 0000000..5b59183
--- /dev/null
+++ b/testsuite/wget/wget-handles-empty-path
@@ -0,0 +1 @@
+busybox wget http://www.google.com
-- 
cgit v1.1