[openssl-commits] [openssl] OpenSSL_1_1_1-stable update
yang.yang at baishancloud.com
yang.yang at baishancloud.com
Wed Feb 13 06:31:42 UTC 2019
The branch OpenSSL_1_1_1-stable has been updated
via 851437094aca6067d425f7869751df41cde775fe (commit)
from 2cf7fd698ec1375421f91338ff8a44e7da5238b6 (commit)
- Log -----------------------------------------------------------------
commit 851437094aca6067d425f7869751df41cde775fe
Author: Daniel DeFreez <daniel at defreez.com>
Date: Wed Feb 13 14:26:14 2019 +0800
Fix null pointer dereference in cms_RecipientInfo_kari_init
CLA: trivial
Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
Reviewed-by: Paul Yang <yang.yang at baishancloud.com>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8137)
(cherry picked from commit b754a8a1590b8c5c9662c8a0ba49573991488b20)
-----------------------------------------------------------------------
Summary of changes:
crypto/cms/cms_kari.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/crypto/cms/cms_kari.c b/crypto/cms/cms_kari.c
index 3bc46fe..f104eec 100644
--- a/crypto/cms/cms_kari.c
+++ b/crypto/cms/cms_kari.c
@@ -282,7 +282,7 @@ static int cms_kari_create_ephemeral_key(CMS_KeyAgreeRecipientInfo *kari,
return rv;
}
-/* Initialise a ktri based on passed certificate and key */
+/* Initialise a kari based on passed certificate and key */
int cms_RecipientInfo_kari_init(CMS_RecipientInfo *ri, X509 *recip,
EVP_PKEY *pk, unsigned int flags)
@@ -299,6 +299,9 @@ int cms_RecipientInfo_kari_init(CMS_RecipientInfo *ri, X509 *recip,
kari->version = 3;
rek = M_ASN1_new_of(CMS_RecipientEncryptedKey);
+ if (rek == NULL)
+ return 0;
+
if (!sk_CMS_RecipientEncryptedKey_push(kari->recipientEncryptedKeys, rek)) {
M_ASN1_free_of(rek, CMS_RecipientEncryptedKey);
return 0;
More information about the openssl-commits
mailing list