about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-07-28 09:20:02 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-07-28 09:20:02 +0000
commit7d1480af54e95e5a2165e8bb69937a6b0a1dc50a (patch)
tree3ee740a9a191fe330237b384f09ecdfbc69a6c6b /Src
parent6844a63daf3e372e99dc6722304dc9cc4fcc5095 (diff)
downloadzsh-7d1480af54e95e5a2165e8bb69937a6b0a1dc50a.tar.gz
zsh-7d1480af54e95e5a2165e8bb69937a6b0a1dc50a.tar.xz
zsh-7d1480af54e95e5a2165e8bb69937a6b0a1dc50a.zip
29626: arguments to anonymous functions shouldn't be parsed as command words
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c1
-rw-r--r--Src/parse.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/Src/params.c b/Src/params.c
index 8a56766f8..fd0872130 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -4193,6 +4193,7 @@ arrfixenv(char *s, char **t)
 int
 zputenv(char *str)
 {
+    DPUTS(!str, "Attempt to put null string into environment.");
 #ifdef USE_SET_UNSET_ENV
     /*
      * If we are using unsetenv() to remove values from the
diff --git a/Src/parse.c b/Src/parse.c
index 5b6f09949..5b8f0af48 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1465,6 +1465,7 @@ par_funcdef(void)
 	    ecssub = oecssub;
 	    YYERRORV(oecused);
 	}
+	incmdpos = 0;
 	zshlex();
     } else if (unset(SHORTLOOPS)) {
 	lineno += oldlineno;
@@ -1720,6 +1721,7 @@ par_simple(int *complex, int nr)
 		    ecssub = oecssub;
 		    YYERROR(oecused);
 		}
+		incmdpos = 0;
 		zshlex();
 	    } else {
 		int ll, sl, c = 0;