summaryrefslogtreecommitdiffstats
path: root/ssh-agent.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-08 16:15:55 +1100
committerDamien Miller <djm@mindrot.org>1999-11-08 16:15:55 +1100
commitfd7c911f090749774cf1869420523c4811beeeb0 (patch)
treecd57567ddb3371c0c805a8bd8ace0c66df02fa53 /ssh-agent.c
parent5ac5f1ca6b5270e1a755d75120f8217f5850c9b2 (diff)
Merged OpenBSD CVS changes that go awayV_1_2_PRE8
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index 4f7f57f0..96bd021e 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -16,7 +16,7 @@ The authentication agent program.
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-agent.c,v 1.16 1999/10/28 20:41:23 markus Exp $");
+RCSID("$OpenBSD: ssh-agent.c,v 1.17 1999/11/02 19:42:36 markus Exp $");
#include "ssh.h"
#include "rsa.h"
@@ -136,7 +136,12 @@ process_authentication_challenge(SocketEntry *e)
case 1: /* As of protocol 1.1 */
/* The response is MD5 of decrypted challenge plus session id. */
len = BN_num_bytes(challenge);
- assert(len <= 32 && len);
+
+ if (len <= 0 || len > 32) {
+ fatal("process_authentication_challenge: "
+ "bad challenge length %d", len);
+ }
+
memset(buf, 0, 32);
BN_bn2bin(challenge, buf + 32 - len);
MD5_Init(&md);