From fb24808db9af9dfe36f9f6d7fc24e0b903ecc12c Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 8 May 2014 11:46:38 +0900 Subject: agent: Fix auth key comment handling. * agent/command-ssh.c (ssh_send_key_public): Handle the case with no comment. --- agent/command-ssh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'agent/command-ssh.c') diff --git a/agent/command-ssh.c b/agent/command-ssh.c index a81468125..d619324cd 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -2331,7 +2331,9 @@ ssh_send_key_public (estream_t stream, gcry_sexp_t key, else { err = ssh_key_extract_comment (key, &comment); - if (!err) + if (err) + err = stream_write_cstring (stream, "(none)"); + else err = stream_write_cstring (stream, comment); } if (err) -- cgit v1.2.3