diff options
author | beck <> | 2014-04-24 06:02:58 +0000 |
---|---|---|
committer | beck <> | 2014-04-24 06:02:58 +0000 |
commit | 7092ac256a7a418fb6aa87744bbed6d1101ea9f8 (patch) | |
tree | 06796e12ae8f103aa091dedcf3a251497163e77e /src | |
parent | 521d82f81a884025986609bc0d8e852f6c346b09 (diff) | |
download | openbsd-7092ac256a7a418fb6aa87744bbed6d1101ea9f8.tar.gz openbsd-7092ac256a7a418fb6aa87744bbed6d1101ea9f8.tar.bz2 openbsd-7092ac256a7a418fb6aa87744bbed6d1101ea9f8.zip |
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@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/s3_pkt.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_pkt.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c index 5ef25a4059..2a88b14852 100644 --- a/src/lib/libssl/s3_pkt.c +++ b/src/lib/libssl/s3_pkt.c | |||
@@ -564,6 +564,8 @@ ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) | |||
564 | } | 564 | } |
565 | } | 565 | } |
566 | 566 | ||
567 | if (len < tot) | ||
568 | len = tot; | ||
567 | n = (len - tot); | 569 | n = (len - tot); |
568 | for (;;) { | 570 | for (;;) { |
569 | if (n > s->max_send_fragment) | 571 | if (n > s->max_send_fragment) |
diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c index 5ef25a4059..2a88b14852 100644 --- a/src/lib/libssl/src/ssl/s3_pkt.c +++ b/src/lib/libssl/src/ssl/s3_pkt.c | |||
@@ -564,6 +564,8 @@ ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) | |||
564 | } | 564 | } |
565 | } | 565 | } |
566 | 566 | ||
567 | if (len < tot) | ||
568 | len = tot; | ||
567 | n = (len - tot); | 569 | n = (len - tot); |
568 | for (;;) { | 570 | for (;;) { |
569 | if (n > s->max_send_fragment) | 571 | if (n > s->max_send_fragment) |