diff options
author | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2013-10-03 15:24:23 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2013-10-03 15:24:23 -0400 |
commit | f7e37e6b2f83f7fd00f7e5aaee9ecc55e349fd87 (patch) | |
tree | 9ab8dd6b7fe984902198b805f5203239abd6cd94 | |
parent | 6bbf44a00b35fb28df1f66aa194b2fe95eab1ab2 (diff) | |
download | pyopenssl-f7e37e6b2f83f7fd00f7e5aaee9ecc55e349fd87.tar.gz |
Fix a memory management issue that leads to crashes in OpenSSL.crypto.X509.get_serial_number in some environments.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | OpenSSL/crypto/x509.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2013-10-03 Christian Heimes <christian@python.org> + + * OpenSSL/crypto/x509.c: Fix an inconsistency in memory management + in X509.get_serial_number which leads to crashes on some runtimes + (certain Windows/Python 3.3 environments, at least). + 2013-08-11 Christian Heimes <christian@python.org> * OpenSSL/crypto/x509ext.c: Fix handling of NULL bytes inside diff --git a/OpenSSL/crypto/x509.c b/OpenSSL/crypto/x509.c index 8ee4bff..9a4fe94 100644 --- a/OpenSSL/crypto/x509.c +++ b/OpenSSL/crypto/x509.c @@ -78,7 +78,7 @@ crypto_X509_get_serial_number(crypto_X509Obj *self, PyObject *args) hex = BN_bn2hex(bignum); res = PyLong_FromString(hex, NULL, 16); BN_free(bignum); - free(hex); + OPENSSL_free(hex); return res; } |