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) {