svn commit: branches/busybox_1_4_stable/networking

vda at busybox.net vda at busybox.net
Sun Mar 18 18:00:51 UTC 2007


Author: vda
Date: 2007-03-18 11:00:51 -0700 (Sun, 18 Mar 2007)
New Revision: 18142

Log:
wget: fix access-to-ro memory


Modified:
   branches/busybox_1_4_stable/networking/wget.c


Changeset:
Modified: branches/busybox_1_4_stable/networking/wget.c
===================================================================
--- branches/busybox_1_4_stable/networking/wget.c	2007-03-18 18:00:12 UTC (rev 18141)
+++ branches/busybox_1_4_stable/networking/wget.c	2007-03-18 18:00:51 UTC (rev 18142)
@@ -543,7 +543,9 @@
 	p = strchr(h->host, '?'); if (!sp || (p && sp > p)) sp = p;
 	p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p;
 	if (!sp) {
-		h->path = "";
+		/* must be writable because of bb_get_last_path_component() */
+		static char nullstr[] = "";
+		h->path = nullstr;
 	} else if (*sp == '/') {
 		*sp = '\0';
 		h->path = sp + 1;




More information about the busybox-cvs mailing list