1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-20 15:45:21 +01:00
openwrt/package/busybox/patches/150-wget_segv_fix.patch
Felix Fietkau f2c73eaa20 add some more busybox patches from upstream
SVN-Revision: 6290
2007-02-12 22:34:54 +00:00

15 lines
592 B
Diff

diff -urN busybox-1.4.1/networking/wget.c busybox-1.4.1-wgetSEGV/networking/wget.c
--- busybox-1.4.1/networking/wget.c 2007-01-24 22:34:34.000000000 +0100
+++ busybox-1.4.1-wgetSEGV/networking/wget.c 2007-02-11 17:21:18.000000000 +0100
@@ -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;