summaryrefslogtreecommitdiff
path: root/bufaux.c
diff options
context:
space:
mode:
Diffstat (limited to 'bufaux.c')
-rw-r--r--bufaux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bufaux.c b/bufaux.c
index 5dbf2b770..8d096a056 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: bufaux.c,v 1.35 2005/03/10 22:01:05 deraadt Exp $"); 40RCSID("$OpenBSD: bufaux.c,v 1.36 2005/06/17 02:44:32 djm Exp $");
41 41
42#include <openssl/bn.h> 42#include <openssl/bn.h>
43#include "bufaux.h" 43#include "bufaux.h"
@@ -154,7 +154,7 @@ buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value)
154 buf[0] = 0x00; 154 buf[0] = 0x00;
155 /* Get the value of in binary */ 155 /* Get the value of in binary */
156 oi = BN_bn2bin(value, buf+1); 156 oi = BN_bn2bin(value, buf+1);
157 if (oi != bytes-1) { 157 if (oi < 0 || (u_int)oi != bytes - 1) {
158 error("buffer_put_bignum2_ret: BN_bn2bin() failed: " 158 error("buffer_put_bignum2_ret: BN_bn2bin() failed: "
159 "oi %d != bin_size %d", oi, bytes); 159 "oi %d != bin_size %d", oi, bytes);
160 xfree(buf); 160 xfree(buf);