From c095bec2505194b018858f78b1152313f7b23980 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Fri, 12 Nov 2010 23:34:03 +0000 Subject: [PATCH] - Fixed bug #53136 (Invalid read on openssl_csr_new()) --- NEWS | 1 + ext/openssl/openssl.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 9a380614ce0..a16929ba1b9 100644 --- a/NEWS +++ b/NEWS @@ -81,6 +81,7 @@ - Fixed bug #53144 (Segfault in SplObjectStorage::removeAll()). (Felipe) - Fixed bug #53141 (autoload misbehaves if called from closing session). (ladislav at marek dot su) +- Fixed bug #53136 (Invalid read on openssl_csr_new()). (Felipe) - Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). (Gustavo) - Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the underlying stream does not support seeking). (Gustavo) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index a9806ceae2a..0440aa7d16d 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -2117,7 +2117,8 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z if (attribs) { zend_hash_internal_pointer_reset_ex(HASH_OF(attribs), &hpos); while(zend_hash_get_current_data_ex(HASH_OF(attribs), (void**)&item, &hpos) == SUCCESS) { - char * strindex; uint strindexlen; + char *strindex = NULL; + uint strindexlen; ulong intindex; zend_hash_get_current_key_ex(HASH_OF(attribs), &strindex, &strindexlen, &intindex, 0, &hpos);