diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2020-03-06 18:25:13 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2020-03-06 18:25:13 +0000 |
commit | e0e7811b27e6dd42dc3f53d812b6802c8b45abfc (patch) | |
tree | be9ed7377e8da74be3ccb767e703c68b60816ad5 /usr.bin | |
parent | 912ed3ef410f830f8f9a33273762ecb0f4280932 (diff) |
fix possible null-deref in check_key_not_revoked; ok djm
Diffstat (limited to 'usr.bin')
-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; |