diff options
author | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:32:03 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:32:03 +0000 |
commit | 04942aa41fa94ec6f2c3ce1d348f600f31bb7c78 (patch) | |
tree | af8e928bd79d3f2d0219bb5b2c78b573ec31d94c /bufaux.c | |
parent | 9ad7b718d42e43f3a285fcbc8f91193931fce324 (diff) | |
parent | 16704d57999d987fb8d9ba53379841a79f016d67 (diff) |
import openssh-4.2p1-gsskex-20050926-2.patch
Diffstat (limited to 'bufaux.c')
-rw-r--r-- | bufaux.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: bufaux.c,v 1.34 2004/12/06 16:00:43 markus Exp $"); | 40 | RCSID("$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); |
@@ -179,7 +179,7 @@ buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value) | |||
179 | { | 179 | { |
180 | u_int len; | 180 | u_int len; |
181 | u_char *bin; | 181 | u_char *bin; |
182 | 182 | ||
183 | if ((bin = buffer_get_string_ret(buffer, &len)) == NULL) { | 183 | if ((bin = buffer_get_string_ret(buffer, &len)) == NULL) { |
184 | error("buffer_get_bignum2_ret: invalid bignum"); | 184 | error("buffer_get_bignum2_ret: invalid bignum"); |
185 | return (-1); | 185 | return (-1); |