Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-18 21:00:51 +0300
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-18 21:00:51 +0300
commitd60a279c341c360f34b8b37a8056a23753187c2c (patch)
treef43734ec0996630daa68f05fd1394393520f6f2d
parent5483a19fc3a781a792f80b27782f9aa9e3e03746 (diff)
wget: fix access-to-ro memory
-rw-r--r--networking/wget.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/networking/wget.c b/networking/wget.c
index cc768db8b..e46539fd9 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -543,7 +543,9 @@ static void parse_url(char *src_url, struct host_info *h)
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;