summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-02-12 22:34:54 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-02-12 22:34:54 +0000
commit14f10a2ff8275dd7f8d80bdb8fc3043d540242df (patch)
treebf193707c5e3bb00a54b6a8c4832e931347b7d03 /package
parentc33c50b4bc3b7134799df6a6081d55fa5027690f (diff)
add some more busybox patches from upstream
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6290 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/busybox/patches/150-wget_segv_fix.patch14
-rw-r--r--package/busybox/patches/160-iproute_fixes.patch71
2 files changed, 85 insertions, 0 deletions
diff --git a/package/busybox/patches/150-wget_segv_fix.patch b/package/busybox/patches/150-wget_segv_fix.patch
new file mode 100644
index 000000000..8375cc79c
--- /dev/null
+++ b/package/busybox/patches/150-wget_segv_fix.patch
@@ -0,0 +1,14 @@
+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;
diff --git a/package/busybox/patches/160-iproute_fixes.patch b/package/busybox/patches/160-iproute_fixes.patch
new file mode 100644
index 000000000..19ab74bc4
--- /dev/null
+++ b/package/busybox/patches/160-iproute_fixes.patch
@@ -0,0 +1,71 @@
+diff -urN busybox-1.4.1/networking/ip.c busybox-1.4.1-iproute/networking/ip.c
+--- busybox-1.4.1/networking/ip.c 2007-01-24 22:34:34.000000000 +0100
++++ busybox-1.4.1-iproute/networking/ip.c 2007-01-27 14:07:05.000000000 +0100
+@@ -33,8 +33,9 @@
+ if (ENABLE_FEATURE_IP_LINK && matches(argv[1], "link") == 0) {
+ ret = do_iplink(argc-2, argv+2);
+ }
+- if (ENABLE_FEATURE_IP_TUNNEL &&
+- (matches(argv[1], "tunnel") == 0 || strcmp(argv[1], "tunl") == 0)) {
++ if (ENABLE_FEATURE_IP_TUNNEL
++ && (matches(argv[1], "tunnel") == 0 || strcmp(argv[1], "tunl") == 0)
++ ) {
+ ret = do_iptunnel(argc-2, argv+2);
+ }
+ if (ENABLE_FEATURE_IP_RULE && matches(argv[1], "rule") == 0) {
+diff -urN busybox-1.4.1/networking/libiproute/iproute.c busybox-1.4.1-iproute/networking/libiproute/iproute.c
+--- busybox-1.4.1/networking/libiproute/iproute.c 2007-01-24 22:34:33.000000000 +0100
++++ busybox-1.4.1-iproute/networking/libiproute/iproute.c 2007-01-27 14:07:05.000000000 +0100
+@@ -835,9 +835,11 @@
+
+ int do_iproute(int argc, char **argv)
+ {
+- static const char * const ip_route_commands[] =
+- { "add", "append", "change", "chg", "delete", "get",
+- "list", "show", "prepend", "replace", "test", "flush", 0 };
++ static const char * const ip_route_commands[] = {
++ /*0-3*/ "add", "append", "change", "chg",
++ /*4-7*/ "delete", "get", "list", "show",
++ /*8..*/ "prepend", "replace", "test", "flush", 0
++ };
+ int command_num = 6;
+ unsigned int flags = 0;
+ int cmd = RTM_NEWROUTE;
+@@ -848,7 +850,7 @@
+ command_num = index_in_substr_array(ip_route_commands, *argv);
+ }
+ switch (command_num) {
+- case 0: /* add*/
++ case 0: /* add */
+ flags = NLM_F_CREATE|NLM_F_EXCL;
+ break;
+ case 1: /* append */
+@@ -859,21 +861,20 @@
+ flags = NLM_F_REPLACE;
+ break;
+ case 4: /* delete */
+- case 5: /* del */
+ cmd = RTM_DELROUTE;
+ break;
+- case 6: /* get */
++ case 5: /* get */
+ return iproute_get(argc-1, argv+1);
+- case 7: /* list */
+- case 8: /* show */
++ case 6: /* list */
++ case 7: /* show */
+ return iproute_list_or_flush(argc-1, argv+1, 0);
+- case 9: /* prepend */
++ case 8: /* prepend */
+ flags = NLM_F_CREATE;
+- case 10: /* replace */
++ case 9: /* replace */
+ flags = NLM_F_CREATE|NLM_F_REPLACE;
+- case 11: /* test */
++ case 10: /* test */
+ flags = NLM_F_EXCL;
+- case 12: /* flush */
++ case 11: /* flush */
+ return iproute_list_or_flush(argc-1, argv+1, 1);
+ default:
+ bb_error_msg_and_die("unknown command %s", *argv);