diff options
author | Pauli <pauli@openssl.org> | 2023-09-28 11:34:48 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-10-03 19:03:38 +1100 |
commit | dec12f23481036b492c7ca8d5590eb52cc35dab0 (patch) | |
tree | 458c63a659a6ea70580222b685a6608dc9fc292d /crypto | |
parent | e07093f222e2bdc6d1f7ee797d6bb840af085701 (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)
(cherry picked from commit 15410839c668f97b5c03ee1a1bc1a2bf4315715f)
Diffstat (limited to 'crypto')
-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 8cbe1828bc..31da28b4ff 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -529,13 +529,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 { |