summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-26 17:52:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-26 17:52:16 +0000
commite5988675c9ef9690158f92b37803b7764987109b (patch)
tree95eb01f909ae3eb82ce9cf8d8a3e91e3ca004aa8 /usr.bin/ftp
parent072a679b9b8a5163b6c2cf9bf7a7debd159a1e03 (diff)
recommended fix from tri@iki.fi...
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r--usr.bin/ftp/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c
index 137c18c8a86..8271b179392 100644
--- a/usr.bin/ftp/util.c
+++ b/usr.bin/ftp/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.17 1998/03/30 06:59:36 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.18 1998/04/26 17:52:15 deraadt Exp $ */
/* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: util.c,v 1.17 1998/03/30 06:59:36 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: util.c,v 1.18 1998/04/26 17:52:15 deraadt Exp $";
#endif /* not lint */
/*
@@ -268,6 +268,7 @@ tryagain:
fprintf(ttyout, "Name (%s:%s): ", host, myname);
else
fprintf(ttyout, "Name (%s): ", host);
+ *tmp = '\0';
(void)fgets(tmp, sizeof(tmp) - 1, stdin);
tmp[strlen(tmp) - 1] = '\0';
if (*tmp == '\0')