From: Bernd Edlinger Date: Fri, 2 Nov 2018 10:46:38 +0000 (+0100) Subject: Fix error handling in RAND_DRBG_uninstantiate X-Git-Tag: openssl-3.0.0-alpha1~2937 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fb9c3ff565aa11b08646e0f9f28fc082ed365cbd;p=oweals%2Fopenssl.git Fix error handling in RAND_DRBG_uninstantiate Reviewed-by: Matthias St. Pierre Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/7517) --- 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;