summaryrefslogtreecommitdiff
path: root/usr.bin/skeyinit
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2002-06-06 20:56:03 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2002-06-06 20:56:03 +0000
commitf695066cd00f0cffbd086b816441e47f0c4ec11e (patch)
tree0c5b9a6eca6b3fb1f18dfdc4328ed995c752435d /usr.bin/skeyinit
parente070c2811b27d03fce8bc76368b58f9b4abcd455 (diff)
Zero out memory filled in by readpassphrase(3). Also fix a spelling error;
markus@ ok.
Diffstat (limited to 'usr.bin/skeyinit')
-rw-r--r--usr.bin/skeyinit/skeyinit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/skeyinit/skeyinit.c b/usr.bin/skeyinit/skeyinit.c
index 0cbc46ef7a2..a0e49d0faae 100644
--- a/usr.bin/skeyinit/skeyinit.c
+++ b/usr.bin/skeyinit/skeyinit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skeyinit.c,v 1.36 2002/05/19 02:09:28 millert Exp $ */
+/* $OpenBSD: skeyinit.c,v 1.37 2002/06/06 20:56:02 aaron Exp $ */
/* OpenBSD S/Key (skeyinit.c)
*
@@ -379,6 +379,9 @@ normal_mode(char *username, int n, char *key, char *seed, char *defaultseed)
/* Get user's secret passphrase */
for (i = 0; ; i++) {
+ memset(passwd, 0, sizeof(passwd));
+ memset(passwd2, 0, sizeof(passwd2));
+
if (i > 2)
exit(1);
@@ -399,7 +402,8 @@ normal_mode(char *username, int n, char *key, char *seed, char *defaultseed)
strlen(passwd)) {
(void)fputs("ERROR: Your passphrase must contain more "
"than just lower case letters.\nWhitespace, "
- "numbers, and puctuation are suggested.\n", stderr);
+ "numbers, and punctuation are suggested.\n",
+ stderr);
continue;
} else if (strlen(passwd) > 63) {
(void)fprintf(stderr, "WARNING: Your passphrase is "