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:50:26 +0000 (08:50 +0200)
commit1d0671b81f18385ee6e73eed12b27fb25f27c67d
tree620dde628dccc37246e28b474b6958f26a1b4739
parent13ce86259ebe6bba2096f0135337a93dba625ecb
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