From: Richard Levitte Date: Thu, 18 Apr 2019 15:46:32 +0000 (+0200) Subject: ossl_method_store_cache_get(): ensure non-NULL property query X-Git-Tag: openssl-3.0.0-alpha1~2162 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=1393722af384cdf310645c598bbd06a3bbaa2f31 ossl_method_store_cache_get(): ensure non-NULL property query The comparator further down the call stack doesn't tolerate NULL, so if we got that as input, use the empty string. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/8781) --- diff --git a/crypto/property/property.c b/crypto/property/property.c index 1a3d0c480d..a2122dc1bc 100644 --- a/crypto/property/property.c +++ b/crypto/property/property.c @@ -450,7 +450,7 @@ int ossl_method_store_cache_get(OSSL_METHOD_STORE *store, int nid, return 0; } - elem.query = prop_query; + elem.query = prop_query != NULL ? prop_query : ""; r = lh_QUERY_retrieve(alg->cache, &elem); if (r == NULL) { ossl_property_unlock(store);