diff options
author | Pauli <pauli@openssl.org> | 2023-09-28 11:34:48 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-10-02 19:18:21 +1100 |
commit | 15410839c668f97b5c03ee1a1bc1a2bf4315715f (patch) | |
tree | c65829b77eac60bdbbc6de456f25998fecf23b26 /crypto/rand | |
parent | 8ed76c62b5d3214e807e684c06efd69c6471c800 (diff) |
Coverity 1545176: dereference before NULL check
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/22211)
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/rand_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 46e294a378..7fbbb0275b 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -536,13 +536,14 @@ static EVP_RAND_CTX *rand_new_seed(OSSL_LIB_CTX *libctx) EVP_RAND *rand; RAND_GLOBAL *dgbl = rand_get_global(libctx); EVP_RAND_CTX *ctx = NULL; - const char *propq = dgbl->seed_propq; + const char *propq; char *name, *props = NULL; size_t props_len; OSSL_PROPERTY_LIST *pl1, *pl2, *pl3 = NULL; if (dgbl == NULL) return NULL; + propq = dgbl->seed_propq; if (dgbl->seed_name != NULL) { name = dgbl->seed_name; } else { |