about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-03-14 12:14:04 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-03-14 12:14:04 +0000
commit567a8e1d50fc446c5fc2644b8606ac357cf1718a (patch)
tree9b9c5dd38f7493cdb7ee599e7af4fad82f4ac9c2
parent948f015df0fee27f4e2c73b442a75c9434702550 (diff)
downloadzsh-567a8e1d50fc446c5fc2644b8606ac357cf1718a.tar.gz
zsh-567a8e1d50fc446c5fc2644b8606ac357cf1718a.tar.xz
zsh-567a8e1d50fc446c5fc2644b8606ac357cf1718a.zip
24712: handling of backticks being requoted for double quotes
-rw-r--r--ChangeLog3
-rw-r--r--Src/utils.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ca3eb3ccd..34b625a52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-03-14  Peter Stephenson  <pws@csr.com>
 
+	* 24712: Src/utils.c: handling of backticks when being requoted
+	for use inside double quotes had off-by-one error.
+
 	* 24711: Src/parse.c, Src/text.c, Src/zsh.h,
 	Test/A04redirect.ztst:  fix re-presentation of here-documents
 	munged internally to here-strings.
diff --git a/Src/utils.c b/Src/utils.c
index a5b81420f..1d0b5dc67 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -4268,6 +4268,8 @@ quotestring(const char *s, char **e, int instring)
 		while (*u && *u != c)
 		    *v++ = *u++;
 		*v++ = c;
+		if (*u)
+		    u++;
 		continue;
 	    } else if ((*u == Qstring || *u == '$') && u[1] == '\'' &&
 		       instring == QT_DOUBLE) {