summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/bufaux.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2005-06-17 02:44:34 +0000
committerDamien Miller <djm@cvs.openbsd.org>2005-06-17 02:44:34 +0000
commitb5216077cb730c6b79d1055d1def970e752dbe34 (patch)
treef4f04edbda8b821a170db1a0fc39692ec8bfe1f7 /usr.bin/ssh/bufaux.c
parent8fe5283bfe2d882aca8af010f5157ba3a42e114d (diff)
make this -Wsign-compare clean; ok avsm@ markus@
Diffstat (limited to 'usr.bin/ssh/bufaux.c')
-rw-r--r--usr.bin/ssh/bufaux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/bufaux.c b/usr.bin/ssh/bufaux.c
index 5dbf2b770a8..8d096a05638 100644
--- a/usr.bin/ssh/bufaux.c
+++ b/usr.bin/ssh/bufaux.c
@@ -37,7 +37,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: bufaux.c,v 1.35 2005/03/10 22:01:05 deraadt Exp $");
+RCSID("$OpenBSD: bufaux.c,v 1.36 2005/06/17 02:44:32 djm Exp $");
#include <openssl/bn.h>
#include "bufaux.h"
@@ -154,7 +154,7 @@ buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value)
buf[0] = 0x00;
/* Get the value of in binary */
oi = BN_bn2bin(value, buf+1);
- if (oi != bytes-1) {
+ if (oi < 0 || (u_int)oi != bytes - 1) {
error("buffer_put_bignum2_ret: BN_bn2bin() failed: "
"oi %d != bin_size %d", oi, bytes);
xfree(buf);