Change BIO_number_read and BIO_number_written() to be 64 bit
authorMatt Caswell <matt@openssl.org>
Thu, 4 Jun 2015 09:35:08 +0000 (10:35 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 10 Jun 2015 09:40:50 +0000 (10:40 +0100)
commitb8b12aadd8edfd3bd327157c8899b1cf3403177f
tree2b8e5fb28fffb6b9049cae0934ddb28c38520346
parent54e3ad003bdf83f189b2bf17fb998c028d39c8eb
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>
CHANGES
crypto/bio/bio_lib.c
demos/easy_tls/easy-tls.c
include/openssl/bio.h