php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52001
Patch patch-dont-ruine-uninitialized-ptr revision 2010-06-08 02:40 UTC by boldin dot pavel at gmail dot com
Patch patch-bug-52001-tests revision 2010-06-07 23:27 UTC by boldin dot pavel at gmail dot com
Patch patch-zend-fetch-make-ref-uninitialized-ptr revision 2010-06-06 17:03 UTC by boldin dot pavel at gmail dot com

Patch patch-zend-fetch-make-ref-uninitialized-ptr for Scripting Engine problem Bug #52001

Patch version 2010-06-06 17:03 UTC

Return to Bug #52001 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: boldin.pavel@gmail.com

diff -NurpP -x '*~' php-5.3.2.orig/Zend/zend_vm_def.h php-5.3.2.new//Zend/zend_vm_def.h
--- php-5.3.2.orig/Zend/zend_vm_def.h	2010-01-05 23:46:53.000000000 +0300
+++ php-5.3.2.new//Zend/zend_vm_def.h	2010-06-06 20:58:27.000000000 +0400
@@ -995,7 +995,8 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address
 		zval_dtor(varname);
 	}
 	if (!RETURN_VALUE_UNUSED(&opline->result)) {
-		if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+		if (opline->extended_value & ZEND_FETCH_MAKE_REF &&
+		    *retval != EG(uninitialized_zval_ptr) ) {
 			SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
 		}
 		PZVAL_LOCK(*retval);
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 09:02:29 2014 UTC