summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/csh/dol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/csh/dol.c b/bin/csh/dol.c
index 2d2e743c946..fd915043bb9 100644
--- a/bin/csh/dol.c
+++ b/bin/csh/dol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dol.c,v 1.13 2003/06/11 21:09:50 deraadt Exp $ */
+/* $OpenBSD: dol.c,v 1.14 2003/12/01 18:25:15 millert Exp $ */
/* $NetBSD: dol.c,v 1.8 1995/09/27 00:38:38 jtc Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dol.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: dol.c,v 1.13 2003/06/11 21:09:50 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: dol.c,v 1.14 2003/12/01 18:25:15 millert Exp $";
#endif
#endif /* not lint */
@@ -721,6 +721,7 @@ setDolp(Char *cp)
size_t len = Strlen(cp) + 1 - lhlen + rhlen;
np = (Char *) xmalloc(len * sizeof(Char));
+ *dp = 0;
(void) Strlcpy(np, cp, len);
(void) Strlcat(np, rhsub, len);
(void) Strlcat(np, dp + lhlen, len);