summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2018-11-02 11:46:38 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2018-11-05 22:35:11 +0100
commitfb9c3ff565aa11b08646e0f9f28fc082ed365cbd (patch)
tree2085b19998f7258f68b35206a508425dc1958cac
parent7ecd6c5186f3958b726edb3f5e5851f12ad56485 (diff)
Fix error handling in RAND_DRBG_uninstantiate
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7517)
-rw-r--r--crypto/rand/drbg_lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index cd298a7e16..2cfa4f5b8c 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -437,6 +437,7 @@ int RAND_DRBG_uninstantiate(RAND_DRBG *drbg)
{
int index = -1, type, flags;
if (drbg->meth == NULL) {
+ drbg->state = DRBG_ERROR;
RANDerr(RAND_F_RAND_DRBG_UNINSTANTIATE,
RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED);
return 0;