php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch bug62737.patch for Reproducible crash Bug #62737Patch version 2012-08-04 15:13 UTC Return to Bug #62737 | Download this patchThis patch renders other patches obsolete Obsolete patches:
Developer: laruence@php.netdiff --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); |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Dec 26 10:01:29 2024 UTC |