diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-02 19:42:38 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-02 19:42:38 +0000 |
commit | 2ead5c3b4ced4f49e06a89584465413410b5ba48 (patch) | |
tree | 48e1bb52c0e107927c0f5704e3d56bcddc187f8a /usr.bin/ssh/ssh-agent.c | |
parent | e0db7ed9032e37a2f0f4b9704101d7745e3b8b4a (diff) |
replace assert() with error, fatal or packet_disconnect
Diffstat (limited to 'usr.bin/ssh/ssh-agent.c')
-rw-r--r-- | usr.bin/ssh/ssh-agent.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index d304e7a670b..87d787dbd08 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.16 1999/10/28 20:41:23 markus Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.17 1999/11/02 19:42:36 markus Exp $ */ /* @@ -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" @@ -131,7 +131,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); |