From 0df6303bb5f2aea6bec6bcc1454bd0971c0358e4 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 6 Jun 2018 20:05:13 +0100 Subject: [PATCH] Fix a valgrind error. rsa_ssh1_fingerprint will look at the input key's comment field, which I forgot to initialise to anything, even the NULL it should be. --- ssh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ssh.c b/ssh.c index 3bac57d2..bc5ba682 100644 --- a/ssh.c +++ b/ssh.c @@ -4141,6 +4141,8 @@ static void do_ssh1_login(void *vctx) get_rsa_ssh1_pub(pktin, &s->servkey, RSA_SSH1_EXPONENT_FIRST); get_rsa_ssh1_pub(pktin, &s->hostkey, RSA_SSH1_EXPONENT_FIRST); + s->hostkey.comment = NULL; /* avoid confusing rsa_ssh1_fingerprint */ + /* * Log the host key fingerprint. */