| Stanislav Malyshev 2005-08-22, 6:57 pm |
| stas Mon Aug 22 09:26:34 2005 EDT
Modified files: (Branch: PHP_5_1)
/ZendEngine2 zend_builtin_functions.c
Log:
fix crash if throw attempted outside of executable code
http://cvs.php.net/diff.php/ZendEng...=1.277.2.2&ty=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.1 ZendEngine2/zend_builtin_functions.c:1.277.2.2
--- ZendEngine2/zend_builtin_functions.c:1.277.2.1 Thu Aug 18 11:13:45 2005
+++ ZendEngine2/zend_builtin_functions.c Mon Aug 22 09:26:33 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.277.2.1 2005/08/18 15:13:45 tony2001 Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.2 2005/08/22 13:26:33 stas Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -1847,7 +1847,7 @@
ptr = EG(current_execute_data);
/* skip "new Exception()" */
- if ((skip_last == 0) && ptr->opline && (ptr->opline->opcode == ZEND_NEW)) {
+ if (ptr && (skip_last == 0) && ptr->opline && (ptr->opline->opcode == ZEND_NEW)) {
ptr = ptr->prev_execute_data;
}
|