about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/builtin.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 89c7c03b2..69b3918c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-02-14  Clint Adams  <schizo@debian.org>
+
+	* 13478: Src/builtins.c: don't call dyncat with a NULL argument.
+
 2001-02-14  Peter Stephenson  <pws@csr.com>
 
 	* 13473: Makefile.in, Doc/Zsh/options.yo: small changes suggested
diff --git a/Src/builtin.c b/Src/builtin.c
index 8a33a5312..e73a7a452 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2468,14 +2468,14 @@ bin_whence(char *nam, char **argv, char *ops, int func)
 	/* Option -a is to search the entire path, *
 	 * rather than just looking for one match. */
 	if (all) {
-	    char **pp, *buf, *z;
+	    char **pp, *buf;
 
 	    pushheap();
 	    for (pp = path; *pp; pp++) {
 		if (**pp) {
-		    z = dyncat(*pp, "/");
-		} else z = NULL;
-		buf = dyncat(z, *argv);
+		    buf = zhtricat(*pp, "/", *argv);
+		} else buf = ztrdup(*argv);
+
 		if (iscom(buf)) {
 		    if (wd) {
 			printf("%s: command\n", *argv);