1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-28 07:02:27 +02:00
openwrt-xburst/package/busybox/patches/000-upstream-ash.patch
nico 626912ac05 package/busybox: add 2 upstream fixes (ash & cpio), bumb release number
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21186 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-27 11:59:19 +00:00

15 lines
441 B
Diff

--- 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 {