RAND_load_file(): avoid adding small chunks to RAND_add()
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Sun, 21 Oct 2018 16:49:19 +0000 (18:49 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Fri, 26 Oct 2018 06:38:08 +0000 (08:38 +0200)
commit6ec6448b9368b581d712514366c38b359ccff2f4
tree0c16759712a6bc4332184e162b87f6a182e9c65b
parentec2d099fccec25e2d92c4cd2958db21f0d0a1d82
RAND_load_file(): avoid adding small chunks to RAND_add()

Increase the load buffer size such that it exceeds the chunk
size by a comfortable amount. This is done to avoid calling
RAND_add() with a small final chunk. Instead, such a small
final chunk will be added together with the previous chunk
(unless it's the only one).

Related-to: #7449
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7456)
crypto/rand/randfile.c