summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/bufbn.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/bufbn.c')
-rw-r--r--crypto/openssh/bufbn.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/crypto/openssh/bufbn.c b/crypto/openssh/bufbn.c
index 9706ba8..251cd09 100644
--- a/crypto/openssh/bufbn.c
+++ b/crypto/openssh/bufbn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bufbn.c,v 1.4 2006/11/06 21:25:28 markus Exp $*/
+/* $OpenBSD: bufbn.c,v 1.6 2007/06/02 09:04:58 djm Exp $*/
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -93,7 +93,7 @@ buffer_put_bignum(Buffer *buffer, const BIGNUM *value)
}
/*
- * Retrieves an BIGNUM from the buffer.
+ * Retrieves a BIGNUM from the buffer.
*/
int
buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value)
@@ -101,7 +101,7 @@ buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value)
u_int bits, bytes;
u_char buf[2], *bin;
- /* Get the number for bits. */
+ /* Get the number of bits. */
if (buffer_get_ret(buffer, (char *) buf, 2) == -1) {
error("buffer_get_bignum_ret: invalid length");
return (-1);
@@ -137,7 +137,7 @@ buffer_get_bignum(Buffer *buffer, BIGNUM *value)
}
/*
- * Stores an BIGNUM in the buffer in SSH2 format.
+ * Stores a BIGNUM in the buffer in SSH2 format.
*/
int
buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value)
@@ -201,12 +201,14 @@ buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value)
return (-1);
}
if (len > 8 * 1024) {
- error("buffer_get_bignum2_ret: cannot handle BN of size %d", len);
+ error("buffer_get_bignum2_ret: cannot handle BN of size %d",
+ len);
xfree(bin);
return (-1);
}
if (BN_bin2bn(bin, len, value) == NULL) {
error("buffer_get_bignum2_ret: BN_bin2bn failed");
+ xfree(bin);
return (-1);
}
xfree(bin);
OpenPOWER on IntegriCloud