From: Bernd Edlinger Date: Tue, 23 Oct 2018 14:30:20 +0000 (+0200) Subject: Fix a possible crash in rand_drbg_get_entropy X-Git-Tag: OpenSSL_1_1_1a~84 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f3f7f1a826617af80a92f58d494ec2c8348251a5;p=oweals%2Fopenssl.git Fix a possible crash in rand_drbg_get_entropy Reviewed-by: Paul Yang Reviewed-by: Matthias St. Pierre Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/7474) (cherry picked from commit 21311777ad8b8c2f2fb8eb7a4f9618ceae1e043d) --- diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index e6fcbce7fd..29d93a829b 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -151,6 +151,8 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg, pool->entropy_requested = entropy; } else { pool = rand_pool_new(entropy, min_len, max_len); + if (pool == NULL) + return 0; } if (drbg->parent) {