]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/evp/mac_lib.c
evp: make all _is_a functions accept and handle a NULL argument
[thirdparty/openssl.git] / crypto / evp / mac_lib.c
index 24fdb35c8efc530bbce9f2fab032a5a92d029d3d..a49c10322035f545d57dea8eae5723b8f9aa66df 100644 (file)
@@ -226,7 +226,7 @@ const char *EVP_MAC_get0_description(const EVP_MAC *mac)
 
 int EVP_MAC_is_a(const EVP_MAC *mac, const char *name)
 {
-    return evp_is_a(mac->prov, mac->name_id, NULL, name);
+    return mac != NULL && evp_is_a(mac->prov, mac->name_id, NULL, name);
 }
 
 int EVP_MAC_names_do_all(const EVP_MAC *mac,