summaryrefslogtreecommitdiffstats
path: root/ssh-keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 2a7939bf..ced047c0 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.292 2016/09/12 03:29:16 dtucker Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.293 2017/02/08 20:32:43 millert Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1441,7 +1441,10 @@ do_change_comment(struct passwd *pw)
sshkey_free(private);
exit(1);
}
- printf("Key now has comment '%s'\n", comment);
+ if (comment)
+ printf("Key now has comment '%s'\n", comment);
+ else
+ printf("Key now has no comment\n");
if (identity_comment) {
strlcpy(new_comment, identity_comment, sizeof(new_comment));