]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
afalg: add a NULL pointer check
authorPauli <paul.dale@oracle.com>
Wed, 28 Oct 2020 09:35:38 +0000 (19:35 +1000)
committerDmitry Belyavskiy <beldmit@gmail.com>
Thu, 29 Oct 2020 13:38:03 +0000 (16:38 +0300)
Fixes #13260

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/13261)

engines/e_afalg.c

index 3b48ffb360046a00f5a8a43d7533988457079ad0..24a1aa900c52dee0c47a6848e4d900a6af320077 100644 (file)
@@ -681,6 +681,9 @@ static cbc_handles *get_cipher_handle(int nid)
 static const EVP_CIPHER *afalg_aes_cbc(int nid)
 {
     cbc_handles *cipher_handle = get_cipher_handle(nid);
+
+    if (cipher_handle == NULL)
+            return NULL;
     if (cipher_handle->_hidden == NULL
         && ((cipher_handle->_hidden =
          EVP_CIPHER_meth_new(nid,