forked from pool/openssl
94fbf434c7
- 0005-libssl-Hide-library-private-symbols.patch Update to hide more symbols that are not part of the public API - openssl-gcc-attributes.patch BUF_memdup also needs attribute alloc_size as it returns memory of size of the second parameter. - openssl-ocloexec.patch Update, accept() also needs O_CLOEXEC. - 0009-Fix-double-frees.patch, 0017-Double-free-in-i2o_ECPublicKey.patch fix various double frees (from upstream) - 012-Fix-eckey_priv_encode.patch eckey_priv_encode should return an error inmediately on failure of i2d_ECPrivateKey (from upstream) - 0001-Axe-builtin-printf-implementation-use-glibc-instead.patch From libressl, modified to work on linux systems that do not have funopen() but fopencookie() instead. Once upon a time, OS didn't have snprintf, which caused openssl to bundle a *printf implementation. We know better nowadays, the glibc implementation has buffer overflow checking, has sane failure modes deal properly with threads, signals..etc.. - build with -fno-common as well. (forwarded request 232752 from elvigia) OBS-URL: https://build.opensuse.org/request/show/232889 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openssl?expand=0&rev=116
52 lines
1.5 KiB
Diff
52 lines
1.5 KiB
Diff
From 9c8dc84ac16a2f21063ae36809d202d0284ecf82 Mon Sep 17 00:00:00 2001
|
|
From: Ben Laurie <ben@links.org>
|
|
Date: Tue, 22 Apr 2014 13:11:56 +0100
|
|
Subject: [PATCH 09/17] Fix double frees.
|
|
|
|
---
|
|
CHANGES | 3 ++-
|
|
crypto/pkcs7/pk7_doit.c | 1 +
|
|
crypto/ts/ts_rsp_verify.c | 1 +
|
|
ssl/d1_srvr.c | 1 +
|
|
4 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c
|
|
index 77fda3b..4c12a9d 100644
|
|
--- a/crypto/pkcs7/pk7_doit.c
|
|
+++ b/crypto/pkcs7/pk7_doit.c
|
|
@@ -928,6 +928,7 @@ int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si)
|
|
if (EVP_DigestSignUpdate(&mctx,abuf,alen) <= 0)
|
|
goto err;
|
|
OPENSSL_free(abuf);
|
|
+ abuf = NULL;
|
|
if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0)
|
|
goto err;
|
|
abuf = OPENSSL_malloc(siglen);
|
|
diff --git a/crypto/ts/ts_rsp_verify.c b/crypto/ts/ts_rsp_verify.c
|
|
index afe16af..b7d170a 100644
|
|
--- a/crypto/ts/ts_rsp_verify.c
|
|
+++ b/crypto/ts/ts_rsp_verify.c
|
|
@@ -629,6 +629,7 @@ static int TS_compute_imprint(BIO *data, TS_TST_INFO *tst_info,
|
|
X509_ALGOR_free(*md_alg);
|
|
OPENSSL_free(*imprint);
|
|
*imprint_len = 0;
|
|
+ *imprint = NULL;
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c
|
|
index 9975e20..1384ab0 100644
|
|
--- a/ssl/d1_srvr.c
|
|
+++ b/ssl/d1_srvr.c
|
|
@@ -1356,6 +1356,7 @@ int dtls1_send_server_key_exchange(SSL *s)
|
|
(unsigned char *)encodedPoint,
|
|
encodedlen);
|
|
OPENSSL_free(encodedPoint);
|
|
+ encodedPoint = NULL;
|
|
p += encodedlen;
|
|
}
|
|
#endif
|
|
--
|
|
1.8.4.5
|
|
|