summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sshconnect1.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sshconnect1.c b/sshconnect1.c
index a04536184..dc00b4cd0 100644
--- a/sshconnect1.c
+++ b/sshconnect1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect1.c,v 1.79 2016/09/19 07:52:42 natano Exp $ */ 1/* $OpenBSD: sshconnect1.c,v 1.80 2017/03/10 03:53:11 dtucker 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
@@ -520,7 +520,8 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
520 cookie[i] = packet_get_char(); 520 cookie[i] = packet_get_char();
521 521
522 /* Get the public key. */ 522 /* Get the public key. */
523 server_key = key_new(KEY_RSA1); 523 if ((server_key = key_new(KEY_RSA1)) == NULL)
524 fatal("%s: key_new(KEY_RSA1) failed", __func__);
524 bits = packet_get_int(); 525 bits = packet_get_int();
525 packet_get_bignum(server_key->rsa->e); 526 packet_get_bignum(server_key->rsa->e);
526 packet_get_bignum(server_key->rsa->n); 527 packet_get_bignum(server_key->rsa->n);
@@ -532,7 +533,8 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
532 logit("Warning: This may be due to an old implementation of ssh."); 533 logit("Warning: This may be due to an old implementation of ssh.");
533 } 534 }
534 /* Get the host key. */ 535 /* Get the host key. */
535 host_key = key_new(KEY_RSA1); 536 if ((host_key = key_new(KEY_RSA1)) == NULL)
537 fatal("%s: key_new(KEY_RSA1) failed", __func__);
536 bits = packet_get_int(); 538 bits = packet_get_int();
537 packet_get_bignum(host_key->rsa->e); 539 packet_get_bignum(host_key->rsa->e);
538 packet_get_bignum(host_key->rsa->n); 540 packet_get_bignum(host_key->rsa->n);