Skip to content

Commit

Permalink
Fix async engine pause dead lock in error case.
Browse files Browse the repository at this point in the history
In 'crypto/rand/ossl_rand.c', a call to
'ASYNC_unblock_pause()' is missing in an error case.

CLA: trivial

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from #4020)
  • Loading branch information
EmericBr authored and kaduk committed Jul 26, 2017
1 parent a58eb06 commit e4b1601
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/rand/ossl_rand.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit e4b1601

Please sign in to comment.