summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-04-17 08:14:02 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-04-17 08:14:02 +0000
commitf60514eba299cf8078946abb0e812a7dd962845a (patch)
tree974d8d4846ace968eae35d206e95ef41fafa0b8f
parent4dd0406f252c39e298234d09778c7224bd1a0e10 (diff)
check for key!=NULL, thanks to costa
-rw-r--r--usr.bin/ssh/sshconnect1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshconnect1.c b/usr.bin/ssh/sshconnect1.c
index 865d04e8505..d42676676bf 100644
--- a/usr.bin/ssh/sshconnect1.c
+++ b/usr.bin/ssh/sshconnect1.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect1.c,v 1.30 2001/04/12 19:15:25 markus Exp $");
+RCSID("$OpenBSD: sshconnect1.c,v 1.31 2001/04/17 08:14:01 markus Exp $");
#include <openssl/bn.h>
#include <openssl/evp.h>
@@ -999,7 +999,7 @@ ssh_userauth1(const char *local_user, const char *server_user, char *host,
if ((supported_authentications & (1 << SSH_AUTH_RHOSTS_RSA)) &&
options.rhosts_rsa_authentication) {
for (i = 0; i < nkeys; i++) {
- if (keys[i]->type == KEY_RSA1 &&
+ if (keys[i] != NULL && keys[i]->type == KEY_RSA1 &&
try_rhosts_rsa_authentication(local_user, keys[i]))
return;
}