summaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-10-28 19:35:38 +1000
committerDmitry Belyavskiy <beldmit@gmail.com>2020-10-29 16:38:03 +0300
commit728d03b576f360e72bbddc7e751433575430af3b (patch)
treebd4be891b4980ffa6e5c24c36325518d65bae197 /engines
parent648cf9249e6ec60e0af50d5d903e05244b837cb0 (diff)
downloadopenssl-new-728d03b576f360e72bbddc7e751433575430af3b.tar.gz
afalg: add a NULL pointer check
Fixes #13260 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13261)
Diffstat (limited to 'engines')
-rw-r--r--engines/e_afalg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/e_afalg.c b/engines/e_afalg.c
index 3b48ffb360..24a1aa900c 100644
--- a/engines/e_afalg.c
+++ b/engines/e_afalg.c
@@ -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,