Skip to content

Commit

Permalink
Coverity 1545176: dereference before NULL check
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from #22211)

(cherry picked from commit 1541083)
  • Loading branch information
paulidale committed Oct 3, 2023
1 parent e07093f commit dec12f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/rand/rand_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dec12f2

Please sign in to comment.