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
32 lines
751 B
Diff
32 lines
751 B
Diff
From 8eb094b9460575a328ba04708147c91fc267b394 Mon Sep 17 00:00:00 2001
|
|
From: David Ramos <daramos@stanford.edu>
|
|
Date: Sat, 3 May 2014 12:00:27 +0200
|
|
Subject: [PATCH 17/17] Double free in i2o_ECPublicKey
|
|
|
|
PR: 3338
|
|
---
|
|
crypto/ec/ec_asn1.c | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
|
|
index 145807b..e94f34e 100644
|
|
--- a/crypto/ec/ec_asn1.c
|
|
+++ b/crypto/ec/ec_asn1.c
|
|
@@ -1435,8 +1435,11 @@ int i2o_ECPublicKey(EC_KEY *a, unsigned char **out)
|
|
*out, buf_len, NULL))
|
|
{
|
|
ECerr(EC_F_I2O_ECPUBLICKEY, ERR_R_EC_LIB);
|
|
- OPENSSL_free(*out);
|
|
- *out = NULL;
|
|
+ if (new_buffer)
|
|
+ {
|
|
+ OPENSSL_free(*out);
|
|
+ *out = NULL;
|
|
+ }
|
|
return 0;
|
|
}
|
|
if (!new_buffer)
|
|
--
|
|
1.8.4.5
|
|
|