From: Bernd Edlinger Date: Tue, 30 Oct 2018 22:09:56 +0000 (+0100) Subject: Initialize reseed_gen_counter to 1, like it is done in master X-Git-Tag: OpenSSL_1_1_1a~38 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9bc987f0086052a03982694e0ef69e9617a2b2dc;p=oweals%2Fopenssl.git Initialize reseed_gen_counter to 1, like it is done in master Reviewed-by: Matthias St. Pierre Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/7532) --- diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index d9f01cbba9..de4f333482 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -359,7 +359,7 @@ int RAND_DRBG_instantiate(RAND_DRBG *drbg, } drbg->state = DRBG_READY; - drbg->reseed_gen_counter = 0; + drbg->reseed_gen_counter = 1; drbg->reseed_time = time(NULL); tsan_store(&drbg->reseed_prop_counter, drbg->reseed_next_counter); @@ -451,7 +451,7 @@ int RAND_DRBG_reseed(RAND_DRBG *drbg, goto end; drbg->state = DRBG_READY; - drbg->reseed_gen_counter = 0; + drbg->reseed_gen_counter = 1; drbg->reseed_time = time(NULL); tsan_store(&drbg->reseed_prop_counter, drbg->reseed_next_counter);