]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: fix SEGV in UpdateHostkeys debug() message, triggered
authordjm@openbsd.org <djm@openbsd.org>
Wed, 26 May 2021 01:47:24 +0000 (01:47 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 26 May 2021 02:46:01 +0000 (12:46 +1000)
when the update removed more host keys than remain present. Fix tested by
reporter James Cook, via bugs@

OpenBSD-Commit-ID: 44f641f6ee02bb957f0c1d150495b60cf7b869d3

clientloop.c

index bdd676867898c8a65c192ef2e7a8dba00ff02252..4fa57de88bd4c56bfa2cb4748ba7b10bd17371d2 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.363 2021/05/19 01:24:05 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.364 2021/05/26 01:47:24 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1952,7 +1952,7 @@ hostkeys_check_old(struct hostkey_foreach_line *l, void *_ctx)
                if (!sshkey_equal(l->key, ctx->old_keys[i]))
                        continue;
                debug3_f("found deprecated %s key at %s:%ld as %s",
-                   sshkey_ssh_name(ctx->keys[i]), l->path, l->linenum,
+                   sshkey_ssh_name(ctx->old_keys[i]), l->path, l->linenum,
                    hashed ? "[HASHED]" : l->hosts);
                ctx->old_key_seen = 1;
                break;