summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--src/expand.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 003a0f7..670682b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-26  Roy Marples <uberlord@gentoo.org>
+
+	* Refresh stack pointers after makestrspace in _rmescapes.
+
 2007-09-25  Gerrit Pape <pape@smarden.org>
 
 	* Clarify description of -nt, -ot options to test builtin.
diff --git a/src/expand.c b/src/expand.c
index 8c6c7f9..98ad718 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -1631,7 +1631,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);
+			str = (char *)stackblock() + strloc;
+			p = str + len;
 		} else if (flag & RMESCAPE_HEAP) {
 			r = ckmalloc(fulllen);
 		} else {