about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-04-23 18:50:34 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-04-23 18:50:34 +0000
commit807e5536a59cb0daeb0e3010f68d2ccc0d2b3cfb (patch)
tree28a26dc91629da90e29b5b2d12d12177c2457536
parentf319daae1ddfe2aff724830f768f1d50cb240c93 (diff)
downloadzsh-807e5536a59cb0daeb0e3010f68d2ccc0d2b3cfb.tar.gz
zsh-807e5536a59cb0daeb0e3010f68d2ccc0d2b3cfb.tar.xz
zsh-807e5536a59cb0daeb0e3010f68d2ccc0d2b3cfb.zip
18477: Null pointer dereferenced in _arguments "*-+bar"
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/computil.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f5e1c8be..d9ffaa94b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2003-04-23  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
+	* 18477: Src/Zle/computil.c: null pointer dereferenced with
+	_arguments '*-+bar'.
+
 	* 18466: Src/Modules/tcp.c, Src/Modules/tcp.h: Only the module's
 	C source file should include the corresponding .mdh file.
 
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 7fa4364df..795b2ba50 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1397,7 +1397,7 @@ parse_cadef(char *nam, char **args)
 		    opt->descr = NULL;
 	    } else
 		opt->descr = NULL;
-	    opt->xor = (again == 1 ? zarrdup(xor) : xor);
+	    opt->xor = (again == 1 && xor ? zarrdup(xor) : xor);
 	    opt->type = otype;
 	    opt->args = oargs;
 	    opt->num = nopts++;