diff options
author | Matt Caswell <matt@openssl.org> | 2015-06-04 10:35:08 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-06-10 10:40:50 +0100 |
commit | b8b12aadd8edfd3bd327157c8899b1cf3403177f (patch) | |
tree | 2b8e5fb28fffb6b9049cae0934ddb28c38520346 /demos/easy_tls | |
parent | 54e3ad003bdf83f189b2bf17fb998c028d39c8eb (diff) |
Change BIO_number_read and BIO_number_written() to be 64 bit
The return type of BIO_number_read() and BIO_number_written() as well as
the corresponding num_read and num_write members in the BIO structure has
been changed from unsigned long to uint64_t. On platforms where an unsigned
long is 32 bits (e.g. Windows) these counters could overflow if >4Gb is
transferred.
With thanks to the Open Crypto Audit Project for reporting this issue.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'demos/easy_tls')
-rw-r--r-- | demos/easy_tls/easy-tls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/easy_tls/easy-tls.c b/demos/easy_tls/easy-tls.c index b9512909d1..5b657803d0 100644 --- a/demos/easy_tls/easy-tls.c +++ b/demos/easy_tls/easy-tls.c @@ -1020,7 +1020,7 @@ tls_proxy(int clear_fd, int tls_fd, int info_fd, SSL_CTX *ctx, int client_p) int clear_read_select = 0, clear_write_select = 0, tls_read_select = 0, tls_write_select = 0, progress = 0; int r; - unsigned long num_read = BIO_number_read(rbio), + uint64_t num_read = BIO_number_read(rbio), num_written = BIO_number_written(wbio); DEBUG_MSG2("loop iteration", ++tls_loop_count); |