summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2014-04-24 06:02:59 +0000
committerBob Beck <beck@cvs.openbsd.org>2014-04-24 06:02:59 +0000
commitcda1e477928e15a85e26c66b48fb0ce8a282d47d (patch)
tree2a1fe75ecd60ef746aa8fb8ee939ecbcb10dac8f
parent9513ea055944757fb32b98740ecb536010175e21 (diff)
A fantastic way to make a large unsigned number is to assign
a small signed one to it.. Some people on OpenSSL's list noticed - http://marc.info/?l=openssl-dev&m=139809485525663&w=2 This should fix that, and make sure we don't try to write out insane amounts of stuff. ok miod@ tedu@
-rw-r--r--lib/libssl/src/ssl/s3_pkt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libssl/src/ssl/s3_pkt.c b/lib/libssl/src/ssl/s3_pkt.c
index 5ef25a4059f..2a88b148521 100644
--- a/lib/libssl/src/ssl/s3_pkt.c
+++ b/lib/libssl/src/ssl/s3_pkt.c
@@ -564,6 +564,8 @@ ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
}
}
+ if (len < tot)
+ len = tot;
n = (len - tot);
for (;;) {
if (n > s->max_send_fragment)