php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #62737
Patch bug62737.phpt revision 2012-08-04 15:14 UTC by laruence@php.net
Patch bug62737.patch revision 2012-08-04 15:13 UTC by laruence@php.net
Patch ChangeDisableClassHandler.patch revision 2012-08-03 16:21 UTC by laruence@php.net
revision 2012-08-03 15:02 UTC by laruence@php.net

Patch bug62737.patch for Reproducible crash Bug #62737

Patch version 2012-08-04 15:13 UTC

Return to Bug #62737 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: laruence@php.net

diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 4f8edb5..a74b4d7 100755
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -494,7 +494,7 @@ static spl_filesystem_object * spl_filesystem_object_create_type(int ht, spl_fil
 		Z_TYPE_P(return_value) = IS_OBJECT;
 
 		spl_filesystem_object_get_file_name(source TSRMLS_CC);
-		if (ce->constructor->common.scope != spl_ce_SplFileInfo) {
+		if (!ce->constructor || ce->constructor->common.scope != spl_ce_SplFileInfo) {
 			MAKE_STD_ZVAL(arg1);
 			ZVAL_STRINGL(arg1, source->file_name, source->file_name_len, 1);
 			zend_call_method_with_1_params(&return_value, ce, &ce->constructor, "__construct", NULL, arg1);
@@ -516,7 +516,7 @@ static spl_filesystem_object * spl_filesystem_object_create_type(int ht, spl_fil
 	
 		spl_filesystem_object_get_file_name(source TSRMLS_CC);
 
-		if (ce->constructor->common.scope != spl_ce_SplFileObject) {
+		if (!ce->constructor || ce->constructor->common.scope != spl_ce_SplFileObject) {
 			MAKE_STD_ZVAL(arg1);
 			MAKE_STD_ZVAL(arg2);
 			ZVAL_STRINGL(arg1, source->file_name, source->file_name_len, 1);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC