summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-10-25 08:54:31 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-10-25 08:54:31 +0000
commitcd0c6153e0cae68d06a052ea84f3a965c25dde98 (patch)
treead679e52e0f67f71cd5ddea998ac22eb3301f875
parentc74171da364f5cf88c9a606e977c603e141d2158 (diff)
downloadzsh-cd0c6153e0cae68d06a052ea84f3a965c25dde98.tar.gz
zsh-cd0c6153e0cae68d06a052ea84f3a965c25dde98.zip
30735: array substitutions aren't simple:
prevent crash on process substitution therein
-rw-r--r--ChangeLog7
-rw-r--r--Src/parse.c5
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c7dfa0695..72e45a925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-25 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * 30735: Src/parse.c: array assignments aren't simple because
+ they can contain process substitutions.
+
2012-10-19 Peter Stephenson <pws@csr.com>
* Roman Kaminski: 30738: Completion/Unix/Command/_bzr: send
@@ -287,5 +292,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5750 $
+* $Revision: 1.5751 $
*****************************************************
diff --git a/Src/parse.c b/Src/parse.c
index 096faa072..0f5d99cef 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1610,6 +1610,11 @@ par_simple(int *complex, int nr)
} else if (tok == ENVARRAY) {
int oldcmdpos = incmdpos, n, type2;
+ /*
+ * We consider array setting complex because it can
+ * contain process substitutions, which need a valid job.
+ */
+ *complex = c = 1;
p = ecadd(0);
incmdpos = 0;
if ((type2 = strlen(tokstr) - 1) && tokstr[type2] == '+') {