summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/bufbn.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2006-11-10 16:39:21 +0000
committerdes <des@FreeBSD.org>2006-11-10 16:39:21 +0000
commitf591b3e29c677bff2b0f0d482490554c419128fd (patch)
tree209e642fbe2a816041f67bc27c9800879f5541bc /crypto/openssh/bufbn.c
parente6cc400c8f011e212207834669aaf4b62bee951e (diff)
downloadFreeBSD-src-f591b3e29c677bff2b0f0d482490554c419128fd.zip
FreeBSD-src-f591b3e29c677bff2b0f0d482490554c419128fd.tar.gz
Vendor import of OpenSSH 4.5p1.
Diffstat (limited to 'crypto/openssh/bufbn.c')
-rw-r--r--crypto/openssh/bufbn.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/crypto/openssh/bufbn.c b/crypto/openssh/bufbn.c
index 6cf65d3..9706ba8 100644
--- a/crypto/openssh/bufbn.c
+++ b/crypto/openssh/bufbn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bufbn.c,v 1.3 2006/08/03 03:34:41 deraadt Exp $*/
+/* $OpenBSD: bufbn.c,v 1.4 2006/11/06 21:25:28 markus Exp $*/
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -118,7 +118,10 @@ buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value)
return (-1);
}
bin = buffer_ptr(buffer);
- BN_bin2bn(bin, bytes, value);
+ if (BN_bin2bn(bin, bytes, value) == NULL) {
+ error("buffer_get_bignum_ret: BN_bin2bn failed");
+ return (-1);
+ }
if (buffer_consume_ret(buffer, bytes) == -1) {
error("buffer_get_bignum_ret: buffer_consume failed");
return (-1);
@@ -202,7 +205,10 @@ buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value)
xfree(bin);
return (-1);
}
- BN_bin2bn(bin, len, value);
+ if (BN_bin2bn(bin, len, value) == NULL) {
+ error("buffer_get_bignum2_ret: BN_bin2bn failed");
+ return (-1);
+ }
xfree(bin);
return (0);
}
OpenPOWER on IntegriCloud