From: Pierre Joye Date: Mon, 21 Feb 2011 12:47:38 +0000 (+0000) Subject: - fix bug #54061, memory leak in openssl_decrypt X-Git-Tag: php-5.3.6RC2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69ba87b183149dca125bdcc77dc3643e04aa70de;p=php - fix bug #54061, memory leak in openssl_decrypt --- diff --git a/NEWS b/NEWS index 568fc5798d..fcc0e2d596 100644 --- a/NEWS +++ b/NEWS @@ -8,8 +8,10 @@ - Exif extension: . Fixed bug #54002 (crash on crafted tag, reported by Luca Carettoni). (Pierre) (CVE-2011-0708) + - OpenSSL extension: . Fixed bug #54060 (Memory leaks when openssl_encrypt). (Pierre) + . Fixed bug #54061 (Memory leaks when openssl_decrypt). (Pierre) - SPL extension: . Fixed memory leak in DirectoryIterator::getExtension() and diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 5f86bb8f4e..bc644a709e 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -4804,6 +4804,7 @@ PHP_FUNCTION(openssl_decrypt) if (base64_str) { efree(base64_str); } + EVP_CIPHER_CTX_cleanup(&cipher_ctx); } /* }}} */