projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5483a19
)
wget: fix access-to-ro memory
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sun, 18 Mar 2007 18:00:51 +0000
(18:00 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sun, 18 Mar 2007 18:00:51 +0000
(18:00 -0000)
networking/wget.c
patch
|
blob
|
history
diff --git
a/networking/wget.c
b/networking/wget.c
index cc768db8b6511089492b411f52e30bf1dfea19e1..e46539fd946cb541d0523e8fe98d3d55ab03f69c 100644
(file)
--- 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;