X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/abc4e9a7a4e99c9e6addb1b63e655edcd1a7877f..6367063f5f9df10d9c7d11977daf6694cad956e7:/ssh-dss.c diff --git a/ssh-dss.c b/ssh-dss.c index 9f3a2870..bd709a22 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-dss.c,v 1.9 2001/11/07 22:10:28 markus Exp $"); +RCSID("$OpenBSD: ssh-dss.c,v 1.11 2001/12/27 18:22:16 markus Exp $"); #include #include @@ -145,7 +145,7 @@ ssh_dss_verify( sigblob = buffer_get_string(&b, &len); rlen = buffer_len(&b); buffer_free(&b); - if(rlen != 0) { + if (rlen != 0) { error("ssh_dss_verify: " "remaining bytes in signature %d", rlen); xfree(sigblob); @@ -158,9 +158,12 @@ ssh_dss_verify( } /* parse signature */ - sig = DSA_SIG_new(); - sig->r = BN_new(); - sig->s = BN_new(); + if ((sig = DSA_SIG_new()) == NULL) + fatal("ssh_dss_verify: DSA_SIG_new failed"); + if ((sig->r = BN_new()) == NULL) + fatal("ssh_dss_verify: BN_new failed"); + if ((sig->s = BN_new()) == NULL) + fatal("ssh_dss_verify: BN_new failed"); BN_bin2bn(sigblob, INTBLOB_LEN, sig->r); BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s);