diff options
author | Pauli <paul.dale@oracle.com> | 2020-10-28 10:35:38 +0100 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-10-29 14:38:03 +0100 |
commit | 728d03b576f360e72bbddc7e751433575430af3b (patch) | |
tree | bd4be891b4980ffa6e5c24c36325518d65bae197 /engines/e_afalg.c | |
parent | Rewrite the HPE NonStop Notes file in Markdown with more explanations. (diff) | |
download | openssl-728d03b576f360e72bbddc7e751433575430af3b.tar.xz openssl-728d03b576f360e72bbddc7e751433575430af3b.zip |
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/e_afalg.c')
-rw-r--r-- | engines/e_afalg.c | 3 |
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, |