diff options
author | 2020-03-06 18:25:12 +0000 | |
---|---|---|
committer | 2020-03-06 18:25:12 +0000 | |
commit | 15d5fa5b48f2d74cf3227a7058f85adda4e5414a (patch) | |
tree | 1597e644f35b757a0f00730ee5858722b4acc745 | |
parent | ssh_fetch_identitylist() returns the return value from (diff) | |
download | wireguard-openbsd-15d5fa5b48f2d74cf3227a7058f85adda4e5414a.tar.xz wireguard-openbsd-15d5fa5b48f2d74cf3227a7058f85adda4e5414a.zip |
fix possible null-deref in check_key_not_revoked; ok djm
-rw-r--r-- | usr.bin/ssh/hostfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/hostfile.c b/usr.bin/ssh/hostfile.c index 1ec86f324aa..c661b88a785 100644 --- a/usr.bin/ssh/hostfile.c +++ b/usr.bin/ssh/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.78 2020/02/26 13:40:09 jsg Exp $ */ +/* $OpenBSD: hostfile.c,v 1.79 2020/03/06 18:25:12 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -310,7 +310,7 @@ check_key_not_revoked(struct hostkeys *hostkeys, struct sshkey *k) continue; if (sshkey_equal_public(k, hostkeys->entries[i].key)) return -1; - if (is_cert && + if (is_cert && k != NULL && sshkey_equal_public(k->cert->signature_key, hostkeys->entries[i].key)) return -1; |