1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

30735: array substitutions aren't simple:

prevent crash on process substitution therein
This commit is contained in:
Peter Stephenson 2012-10-25 08:54:31 +00:00
parent c74171da36
commit cd0c6153e0
2 changed files with 11 additions and 1 deletions

View file

@ -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 $
*****************************************************

View file

@ -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] == '+') {