diff options
author | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:34:25 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:34:25 +0000 |
commit | fa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (patch) | |
tree | 28fc9a13eaab935e4de055b561b333d67387a934 /bufaux.c | |
parent | 04942aa41fa94ec6f2c3ce1d348f600f31bb7c78 (diff) | |
parent | 3e2e0ac10674d77618c4c7339e18b83ced247492 (diff) |
import openssh-4.3p2-gsskex-20060223.patch
Diffstat (limited to 'bufaux.c')
-rw-r--r-- | bufaux.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: bufaux.c,v 1.36 2005/06/17 02:44:32 djm Exp $"); | 40 | RCSID("$OpenBSD: bufaux.c,v 1.37 2005/11/05 05:01:15 djm Exp $"); |
41 | 41 | ||
42 | #include <openssl/bn.h> | 42 | #include <openssl/bn.h> |
43 | #include "bufaux.h" | 43 | #include "bufaux.h" |
@@ -63,6 +63,7 @@ buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value) | |||
63 | if (oi != bin_size) { | 63 | if (oi != bin_size) { |
64 | error("buffer_put_bignum_ret: BN_bn2bin() failed: oi %d != bin_size %d", | 64 | error("buffer_put_bignum_ret: BN_bn2bin() failed: oi %d != bin_size %d", |
65 | oi, bin_size); | 65 | oi, bin_size); |
66 | xfree(buf); | ||
66 | return (-1); | 67 | return (-1); |
67 | } | 68 | } |
68 | 69 | ||
@@ -187,10 +188,12 @@ buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value) | |||
187 | 188 | ||
188 | if (len > 0 && (bin[0] & 0x80)) { | 189 | if (len > 0 && (bin[0] & 0x80)) { |
189 | error("buffer_get_bignum2_ret: negative numbers not supported"); | 190 | error("buffer_get_bignum2_ret: negative numbers not supported"); |
191 | xfree(bin); | ||
190 | return (-1); | 192 | return (-1); |
191 | } | 193 | } |
192 | if (len > 8 * 1024) { | 194 | if (len > 8 * 1024) { |
193 | error("buffer_get_bignum2_ret: cannot handle BN of size %d", len); | 195 | error("buffer_get_bignum2_ret: cannot handle BN of size %d", len); |
196 | xfree(bin); | ||
194 | return (-1); | 197 | return (-1); |
195 | } | 198 | } |
196 | BN_bin2bn(bin, len, value); | 199 | BN_bin2bn(bin, len, value); |