mirror of https://github.com/mirror/busybox.git
wget: fix access-to-ro memory
parent
5483a19fc3
commit
d60a279c34
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue