From: Pauli Date: Wed, 28 Oct 2020 09:35:38 +0000 (+1000) Subject: afalg: add a NULL pointer check X-Git-Tag: openssl-3.0.0-alpha8~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=728d03b576f360e72bbddc7e751433575430af3b;p=thirdparty%2Fopenssl.git afalg: add a NULL pointer check Fixes #13260 Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/13261) --- diff --git a/engines/e_afalg.c b/engines/e_afalg.c index 3b48ffb3600..24a1aa900c5 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,