diff options
Diffstat (limited to 'auth-rsa.c')
-rw-r--r-- | auth-rsa.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/auth-rsa.c b/auth-rsa.c index 3be37ffcb..dc1ad81a2 100644 --- a/auth-rsa.c +++ b/auth-rsa.c | |||
@@ -17,7 +17,7 @@ validity of the host key. | |||
17 | 17 | ||
18 | #include "config.h" | 18 | #include "config.h" |
19 | #include "includes.h" | 19 | #include "includes.h" |
20 | RCSID("$Id: auth-rsa.c,v 1.3 1999/10/28 05:23:30 damien Exp $"); | 20 | RCSID("$Id: auth-rsa.c,v 1.4 1999/11/08 05:15:55 damien Exp $"); |
21 | 21 | ||
22 | #include "rsa.h" | 22 | #include "rsa.h" |
23 | #include "packet.h" | 23 | #include "packet.h" |
@@ -98,7 +98,9 @@ auth_rsa_challenge_dialog(unsigned int bits, BIGNUM *e, BIGNUM *n) | |||
98 | 98 | ||
99 | /* The response is MD5 of decrypted challenge plus session id. */ | 99 | /* The response is MD5 of decrypted challenge plus session id. */ |
100 | len = BN_num_bytes(challenge); | 100 | len = BN_num_bytes(challenge); |
101 | assert(len <= 32 && len); | 101 | if (len <= 0 || len > 32) |
102 | fatal("auth_rsa_challenge_dialog: bad challenge length %d", len); | ||
103 | |||
102 | memset(buf, 0, 32); | 104 | memset(buf, 0, 32); |
103 | BN_bn2bin(challenge, buf + 32 - len); | 105 | BN_bn2bin(challenge, buf + 32 - len); |
104 | MD5_Init(&md); | 106 | MD5_Init(&md); |