summaryrefslogtreecommitdiff
path: root/ssh-dss.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-11-07 23:14:41 +1100
committerDarren Tucker <dtucker@zip.com.au>2006-11-07 23:14:41 +1100
commit0bc85579a9b5a106826169303dd2ee61c63c161e (patch)
treed98e767f275d45b4c62984fb73a3484a5b8e134f /ssh-dss.c
parentdf0e438a2e4efe0422f6e0deb732d819d5938437 (diff)
downloadopenssh-git-0bc85579a9b5a106826169303dd2ee61c63c161e.tar.gz
- markus@cvs.openbsd.org 2006/11/06 21:25:28
[auth-rsa.c kexgexc.c kexdhs.c key.c ssh-dss.c sshd.c kexgexs.c ssh-keygen.c bufbn.c moduli.c scard.c kexdhc.c sshconnect1.c dh.c rsa.c] add missing checks for openssl return codes; with & ok djm@
Diffstat (limited to 'ssh-dss.c')
-rw-r--r--ssh-dss.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ssh-dss.c b/ssh-dss.c
index fbc078e8..51a06e98 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-dss.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: ssh-dss.c,v 1.24 2006/11/06 21:25:28 markus Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -161,8 +161,9 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen,
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);
+ if ((BN_bin2bn(sigblob, INTBLOB_LEN, sig->r) == NULL) ||
+ (BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s) == NULL))
+ fatal("ssh_dss_verify: BN_bin2bn failed");
/* clean up */
memset(sigblob, 0, len);