[openssl] OpenSSL_1_1_1-stable update
beldmit at gmail.com
beldmit at gmail.com
Wed Nov 11 10:51:47 UTC 2020
The branch OpenSSL_1_1_1-stable has been updated
via 6f1bee08cf80b9473496991b51f1f4a0decd96de (commit)
from 6e933b35492a4dc3370b9f49890646dadca82cd8 (commit)
- Log -----------------------------------------------------------------
commit 6f1bee08cf80b9473496991b51f1f4a0decd96de
Author: Dmitry Belyavskiy <beldmit at gmail.com>
Date: Fri Oct 9 20:04:05 2020 +0300
Verification zero-length content in S/MIME format
Fixes #13082
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13106)
-----------------------------------------------------------------------
Summary of changes:
crypto/cms/cms_smime.c | 2 +-
crypto/pkcs7/pk7_smime.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c
index 652e97b2e8..2c475ea68c 100644
--- a/crypto/cms/cms_smime.c
+++ b/crypto/cms/cms_smime.c
@@ -341,7 +341,7 @@ int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
char *ptr;
long len;
len = BIO_get_mem_data(dcont, &ptr);
- tmpin = BIO_new_mem_buf(ptr, len);
+ tmpin = (len == 0) ? dcont : BIO_new_mem_buf(ptr, len);
if (tmpin == NULL) {
CMSerr(CMS_F_CMS_VERIFY, ERR_R_MALLOC_FAILURE);
goto err2;
diff --git a/crypto/pkcs7/pk7_smime.c b/crypto/pkcs7/pk7_smime.c
index 44187230ef..4ce44d8d93 100644
--- a/crypto/pkcs7/pk7_smime.c
+++ b/crypto/pkcs7/pk7_smime.c
@@ -301,7 +301,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
char *ptr;
long len;
len = BIO_get_mem_data(indata, &ptr);
- tmpin = BIO_new_mem_buf(ptr, len);
+ tmpin = (len == 0) ? indata : BIO_new_mem_buf(ptr, len);
if (tmpin == NULL) {
PKCS7err(PKCS7_F_PKCS7_VERIFY, ERR_R_MALLOC_FAILURE);
goto err;
More information about the openssl-commits
mailing list