summaryrefslogtreecommitdiffstats
path: root/crypto/evp/kdf_lib.c
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2022-07-14 15:17:41 +1000
committerPauli <pauli@openssl.org>2022-07-17 17:52:06 +1000
commit1d6c45694a1ae4ac5f9aa8f76dc1de68089f8a72 (patch)
treeb3f2fe402599e18a1201930b930a07449bfdfdef /crypto/evp/kdf_lib.c
parentc7f5109e5f847ccb96b761774186ec0ff6c8fec6 (diff)
evp: make all _is_a functions accept and handle a NULL argument
Makes life easier for callers. Fixes Coverity 1503326 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18799) (cherry picked from commit ee8db8c5fb5b091f48d29914126d35a7e29cdcf2)
Diffstat (limited to 'crypto/evp/kdf_lib.c')
-rw-r--r--crypto/evp/kdf_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/kdf_lib.c b/crypto/evp/kdf_lib.c
index 8177626ae0..5b53d9822c 100644
--- a/crypto/evp/kdf_lib.c
+++ b/crypto/evp/kdf_lib.c
@@ -97,7 +97,7 @@ const char *EVP_KDF_get0_description(const EVP_KDF *kdf)
int EVP_KDF_is_a(const EVP_KDF *kdf, const char *name)
{
- return evp_is_a(kdf->prov, kdf->name_id, NULL, name);
+ return kdf != NULL && evp_is_a(kdf->prov, kdf->name_id, NULL, name);
}
const OSSL_PROVIDER *EVP_KDF_get0_provider(const EVP_KDF *kdf)