package/busybox: add 2 upstream fixes (ash & cpio), bumb release number
[openwrt/svn-archive/archive.git] / package / busybox / patches / 000-upstream-ash.patch
diff --git a/package/busybox/patches/000-upstream-ash.patch b/package/busybox/patches/000-upstream-ash.patch
new file mode 100644 (file)
index 0000000..c90e9d2
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -5424,7 +5424,11 @@ rmescapes(char *str, int flag)
+               size_t fulllen = len + strlen(p) + 1;
+               if (flag & RMESCAPE_GROW) {
++                      int strloc = str - (char *)stackblock();
+                       r = makestrspace(fulllen, expdest);
++                      /* p and str may be invalidated by makestrspace */
++                      str = (char *)stackblock() + strloc;
++                      p = str + len;
+               } else if (flag & RMESCAPE_HEAP) {
+                       r = ckmalloc(fulllen);
+               } else {