diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-06-23 05:26:03 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-06-23 05:26:03 +0000 |
commit | 6ef71fcb530fc9a775f3285bf915f49ee2794d45 (patch) | |
tree | de3983cda58d9293a87ec74d1abc388e02884b47 | |
parent | b49ad7e58f438882a88a0cf338a3c040abc145bb (diff) |
handle sigature of size 0 (some broken clients send this).
-rw-r--r-- | usr.bin/ssh/key.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c index 3b9f9f78621..84306a9b0d5 100644 --- a/usr.bin/ssh/key.c +++ b/usr.bin/ssh/key.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: key.c,v 1.25 2001/04/17 10:53:24 markus Exp $"); +RCSID("$OpenBSD: key.c,v 1.26 2001/06/23 05:26:02 markus Exp $"); #include <openssl/evp.h> @@ -768,6 +768,9 @@ key_verify( u_char *signature, int signaturelen, u_char *data, int datalen) { + if (signaturelen == 0) + return -1; + switch(key->type){ case KEY_DSA: return ssh_dss_verify(key, signature, signaturelen, data, datalen); |