agent: Fix auth key comment handling.

* agent/command-ssh.c (ssh_send_key_public): Handle the case with no
comment.
This commit is contained in:
NIIBE Yutaka 2014-05-08 11:46:38 +09:00
parent 57011da53e
commit fb24808db9
1 changed files with 3 additions and 1 deletions

View File

@ -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)