cvs: Zend(PHP_4_4) / zend.c

From: Date: Thu, 09 Jun 2005 10:14:26 +0000
Subject: cvs: Zend(PHP_4_4) / zend.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3778@lists.php.net to get a copy of this message
dmitry Thu Jun 9 06:14:26 2005 EDT Modified files: (Branch: PHP_4_4) /Zend zend.c Log: Fixed bug #25922 (In error handler, modifying 5th arg (errcontext) may result in seg fault) http://cvs.php.net/diff.php/Zend/zend.c?r1=1.162.2.26&r2=1.162.2.26.2.1&ty=u Index: Zend/zend.c diff -u Zend/zend.c:1.162.2.26 Zend/zend.c:1.162.2.26.2.1 --- Zend/zend.c:1.162.2.26 Sun May 22 07:11:22 2005 +++ Zend/zend.c Thu Jun 9 06:14:25 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.162.2.26 2005/05/22 11:11:22 stas Exp $ */ +/* $Id: zend.c,v 1.162.2.26.2.1 2005/06/09 10:14:25 dmitry Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -848,6 +848,9 @@ orig_user_error_handler = EG(user_error_handler); EG(user_error_handler) = NULL; if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC)==SUCCESS) { + if (Z_TYPE_P(z_context) != IS_ARRAY || z_context->value.ht != EG(active_symbol_table)) { + zend_error(E_ERROR, "User error handler must not modify error context"); + } if (retval) { if (Z_TYPE_P(retval) == IS_BOOL && Z_LVAL_P(retval) == 0) { zend_error_cb(type, error_filename, error_lineno, format, args);

« previous php.zend-engine.cvs (#3778) next »