[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Richard Levitte
levitte at openssl.org
Wed Mar 29 05:42:54 UTC 2017
The branch OpenSSL_1_0_2-stable has been updated
via 62f488d31733e5dc77b339f905b44f165550e47d (commit)
from 144ab9b27ffec3f4f01a4a2c069309323bf886d9 (commit)
- Log -----------------------------------------------------------------
commit 62f488d31733e5dc77b339f905b44f165550e47d
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Mon Mar 20 20:50:23 2017 +0100
Fix the error handling in CRYPTO_dup_ex_data.
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2998)
-----------------------------------------------------------------------
Summary of changes:
crypto/ex_data.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index d947f3e..108a195 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -459,7 +459,7 @@ static int int_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
CRYPTO_EX_DATA *from)
{
int mx, j, i;
- char *ptr;
+ void *ptr;
CRYPTO_EX_DATA_FUNCS **storage = NULL;
EX_CLASS_ITEM *item;
if (!from->sk)
@@ -473,6 +473,8 @@ static int int_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
if (j < mx)
mx = j;
if (mx > 0) {
+ if (!CRYPTO_set_ex_data(to, mx - 1, NULL))
+ goto skip;
storage = OPENSSL_malloc(mx * sizeof(CRYPTO_EX_DATA_FUNCS *));
if (!storage)
goto skip;
More information about the openssl-commits
mailing list