From: Pauli Date: Sun, 23 May 2021 23:35:08 +0000 (+1000) Subject: coverity 1484912: Null pointer dereferences (NULL_RETURNS) X-Git-Tag: openssl-3.0.0-beta1~346 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72f62f4408d2a4e75c58706d41775e4f8f7f0034;p=thirdparty%2Fopenssl.git coverity 1484912: Null pointer dereferences (NULL_RETURNS) Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15425) --- diff --git a/crypto/evp/evp_fetch.c b/crypto/evp/evp_fetch.c index e71d827d4b8..f628eb2faeb 100644 --- a/crypto/evp/evp_fetch.c +++ b/crypto/evp/evp_fetch.c @@ -504,6 +504,9 @@ char *evp_get_global_properties_str(OSSL_LIB_CTX *libctx, int loadconfig) char *propstr = NULL; size_t sz; + if (plp == NULL) + return OPENSSL_strdup(""); + sz = ossl_property_list_to_string(libctx, *plp, NULL, 0); if (sz == 0) { ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);