]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Wed, 15 Jul 2015 08:00:11 +0000 (08:00 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 15 Jul 2015 08:02:12 +0000 (18:02 +1000)
fix NULL-deref when SSH1 reenabled

Upstream-ID: f22fd805288c92b3e9646782d15b48894b2d5295

sshd.c

diff --git a/sshd.c b/sshd.c
index 81a9b8245ff3854b83c18a3daba75d48056be87d..4bb34b101b966d66f4a71f742ebd0e1ecb315187 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.454 2015/07/10 06:21:53 markus Exp $ */
+/* $OpenBSD: sshd.c,v 1.455 2015/07/15 08:00:11 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -798,7 +798,7 @@ list_hostkey_types(void)
                key = sensitive_data.host_keys[i];
                if (key == NULL)
                        key = sensitive_data.host_pubkeys[i];
-               if (key == NULL)
+               if (key == NULL && key->type != KEY_RSA1)
                        continue;
                /* Check that the key is accepted in HostkeyAlgorithms */
                if (match_pattern_list(sshkey_ssh_name(key),