summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2015-02-26 20:45:48 +0000
committerDamien Miller <djm@cvs.openbsd.org>2015-02-26 20:45:48 +0000
commit97bde6525504db9ae5ad2905f717561f26d22ae2 (patch)
tree1240272005bcbef99f24aeb2fec7d7c5f2b1b96e /usr.bin/ssh
parent43f222b699d460a98986d670bbf2a1cbcb2203db (diff)
don't printf NULL key comments; reported by Tom Christensen
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/ssh-keygen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index d1595902214..f3c23412ef6 100644
--- a/usr.bin/ssh/ssh-keygen.c
+++ b/usr.bin/ssh/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.265 2015/02/24 15:24:05 naddy Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.266 2015/02/26 20:45:47 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1256,7 +1256,8 @@ do_change_passphrase(struct passwd *pw)
identity_file, ssh_err(r));
exit(1);
}
- printf("Key has comment '%s'\n", comment);
+ if (comment)
+ printf("Key has comment '%s'\n", comment);
/* Ask the new passphrase (twice). */
if (identity_new_passphrase) {