From 3857aa4f7dbbf012c7813d9441ca9c1d96bcfd8f Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 19 Sep 2003 00:44:58 +0000 Subject: [PATCH] MFH: Fixed bug #25570 (Possible crash in apache2handler when zend_bailout called outside of zend_try {} block). --- NEWS | 2 ++ sapi/apache2handler/sapi_apache2.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 9d72ea272c..32d54fec5a 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP 4 NEWS - Fixed crash bug when non-existing save/serializer handler was used. (Jani) - Fixed memory leak in gethostbynamel() if an error occurs. (Sara) - Fixed FastCGI being unable to bind to a specific IP. (Sascha) +- Fixed bug #25570 (Possible crash in apache2handler when zend_bailout called + outside of zend_try {} block). (Ilia) - Fixed bug #25530 (checkdate() incorrectly handles floats). (Ilia) - Fixed bug #25525 (ldap_explode_dn() crashes when passed invalid dn). (Sara, patch by: mikael dot suvi at trigger dot ee) diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 93cc3fdab5..7e9b1e5039 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -492,6 +492,8 @@ static int php_handler(request_rec *r) ap_add_cgi_vars(r); } +zend_first_try { + ctx = SG(server_context); if (ctx == NULL) { ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); @@ -561,6 +563,8 @@ static int php_handler(request_rec *r) ctx->r = parent_req; } +} zend_end_try(); + return OK; } -- 2.40.0