php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64578
Patch bug64578.patch revision 2013-04-04 05:35 UTC by laruence@php.net

Patch bug64578.patch for Reproducible crash Bug #64578

Patch version 2013-04-04 05:35 UTC

Return to Bug #64578 | Download this patch
Patch Revisions:

Developer: laruence@php.net

diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index de7cd4a..16dc08e 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -937,6 +937,10 @@ convert_to_array:
 					zend_error_noreturn(E_ERROR, "[] operator not supported for strings");
 				}
 
+				if (type != BP_VAR_UNSET) {
+					SEPARATE_ZVAL_IF_NOT_REF(container_ptr);
+				}
+
 				if (Z_TYPE_P(dim) != IS_LONG) {
 					switch(Z_TYPE_P(dim)) {
 						/* case IS_LONG: */
@@ -956,9 +960,6 @@ convert_to_array:
 					convert_to_long(&tmp);
 					dim = &tmp;
 				}
-				if (type != BP_VAR_UNSET) {
-					SEPARATE_ZVAL_IF_NOT_REF(container_ptr);
-				}
 				container = *container_ptr;
 				result->str_offset.str = container;
 				PZVAL_LOCK(container);
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Mon Apr 21 02:02:11 2014 UTC