[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Rich Salz
rsalz at openssl.org
Wed Sep 6 14:01:42 UTC 2017
The branch OpenSSL_1_1_0-stable has been updated
via 7dd13abe0ccdbf184303049087eea9a057b94d4b (commit)
from 90507fbb5c880e2903be2321f6054b3cebebda4c (commit)
- Log -----------------------------------------------------------------
commit 7dd13abe0ccdbf184303049087eea9a057b94d4b
Author: Rich Salz <rsalz at openssl.org>
Date: Tue Sep 5 17:21:38 2017 -0400
Add checks for alloc failing.
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/4341)
(cherry picked from commit d3c3dfc5778ab2cca0d25c5959c8b814a334addb)
-----------------------------------------------------------------------
Summary of changes:
crypto/ct/ct_log.c | 2 ++
crypto/pkcs12/p12_mutl.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c
index 6db4c3e..ec6fa38 100644
--- a/crypto/ct/ct_log.c
+++ b/crypto/ct/ct_log.c
@@ -198,6 +198,8 @@ int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file)
char *enabled_logs;
CTLOG_STORE_LOAD_CTX* load_ctx = ctlog_store_load_ctx_new();
+ if (load_ctx == NULL)
+ goto end;
load_ctx->log_store = store;
load_ctx->conf = NCONF_new(NULL);
if (load_ctx->conf == NULL)
diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c
index 899a12e..a9e2202 100644
--- a/crypto/pkcs12/p12_mutl.c
+++ b/crypto/pkcs12/p12_mutl.c
@@ -124,8 +124,8 @@ static int pkcs12_gen_mac(PKCS12 *p12, const char *pass, int passlen,
PKCS12err(PKCS12_F_PKCS12_GEN_MAC, PKCS12_R_KEY_GEN_ERROR);
return 0;
}
- hmac = HMAC_CTX_new();
- if (!HMAC_Init_ex(hmac, key, md_size, md_type, NULL)
+ if ((hmac = HMAC_CTX_new()) == NULL
+ || !HMAC_Init_ex(hmac, key, md_size, md_type, NULL)
|| !HMAC_Update(hmac, p12->authsafes->d.data->data,
p12->authsafes->d.data->length)
|| !HMAC_Final(hmac, mac, maclen)) {
More information about the openssl-commits
mailing list