diff options
author | markus@openbsd.org <markus@openbsd.org> | 2020-03-06 18:25:12 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-03-13 13:18:09 +1100 |
commit | fbff605e637b068061ab6784ff03e3874890c092 (patch) | |
tree | 6aa0938d8c984b086a9a2b3aae924b4f0f76bb4e /hostfile.c | |
parent | bc30b446841fc16e50ed6e75c56ccfbd37b9f281 (diff) |
upstream: fix possible null-deref in check_key_not_revoked; ok
djm
OpenBSD-Commit-ID: 80855e9d7af42bb6fcc16c074ba69876bfe5e3bf
Diffstat (limited to 'hostfile.c')
-rw-r--r-- | hostfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hostfile.c b/hostfile.c index 7af47adf3..a4a355972 100644 --- a/hostfile.c +++ b/hostfile.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hostfile.c,v 1.78 2020/02/26 13:40:09 jsg Exp $ */ | 1 | /* $OpenBSD: hostfile.c,v 1.79 2020/03/06 18:25:12 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -312,7 +312,7 @@ check_key_not_revoked(struct hostkeys *hostkeys, struct sshkey *k) | |||
312 | continue; | 312 | continue; |
313 | if (sshkey_equal_public(k, hostkeys->entries[i].key)) | 313 | if (sshkey_equal_public(k, hostkeys->entries[i].key)) |
314 | return -1; | 314 | return -1; |
315 | if (is_cert && | 315 | if (is_cert && k != NULL && |
316 | sshkey_equal_public(k->cert->signature_key, | 316 | sshkey_equal_public(k->cert->signature_key, |
317 | hostkeys->entries[i].key)) | 317 | hostkeys->entries[i].key)) |
318 | return -1; | 318 | return -1; |