From: Emeric Brun Date: Wed, 26 Jul 2017 13:59:21 +0000 (+0200) Subject: Fix async engine pause dead lock in error case. X-Git-Tag: OpenSSL_1_1_1-pre1~978 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e4b16013e9b3d19241d3ba0bb0875f0d70d93509;p=oweals%2Fopenssl.git Fix async engine pause dead lock in error case. In 'crypto/rand/ossl_rand.c', a call to 'ASYNC_unblock_pause()' is missing in an error case. CLA: trivial Reviewed-by: Rich Salz Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/4020) --- diff --git a/crypto/rand/ossl_rand.c b/crypto/rand/ossl_rand.c index 1b4b21ba4a..119c2b423a 100644 --- a/crypto/rand/ossl_rand.c +++ b/crypto/rand/ossl_rand.c @@ -485,6 +485,7 @@ static int rand_bytes(unsigned char *buf, int num) ASYNC_block_pause(); if (!EVP_DigestUpdate(m, sp->md, sizeof(sp->md)) || !EVP_DigestFinal_ex(m, sp->md, NULL)) { + ASYNC_unblock_pause(); CRYPTO_THREAD_unlock(rand_lock); goto err; }