From: Dmitry Stogov Date: Wed, 20 Feb 2013 18:27:41 +0000 (+0400) Subject: Merge branch 'PHP-5.3' into PHP-5.4 X-Git-Tag: php-5.4.13RC1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c737b89473df9dba6742b8fc8fbf6d009bf05c36;p=php Merge branch 'PHP-5.3' into PHP-5.4 * PHP-5.3: Fixed external entity loading Conflicts: ext/libxml/libxml.c ext/libxml/php_libxml.h --- c737b89473df9dba6742b8fc8fbf6d009bf05c36 diff --cc ext/libxml/libxml.c index 0f1c2bb825,920a90c634..b1cb45db76 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@@ -269,20 -261,9 +269,21 @@@ static PHP_GINIT_FUNCTION(libxml libxml_globals->stream_context = NULL; libxml_globals->error_buffer.c = NULL; libxml_globals->error_list = NULL; + libxml_globals->entity_loader.fci.size = 0; + libxml_globals->entity_loader_disabled = 0; } +static void _php_libxml_destroy_fci(zend_fcall_info *fci) +{ + if (fci->size > 0) { + zval_ptr_dtor(&fci->function_name); + if (fci->object_ptr != NULL) { + zval_ptr_dtor(&fci->object_ptr); + } + fci->size = 0; + } +} + /* Channel libxml file io layer through the PHP streams subsystem. * This allows use of ftps:// and https:// urls */ diff --cc ext/libxml/php_libxml.h index 8b9acc044e,a7d84666f4..04f8b4933b --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@@ -43,10 -43,7 +43,11 @@@ ZEND_BEGIN_MODULE_GLOBALS(libxml zval *stream_context; smart_str error_buffer; zend_llist *error_list; + struct _php_libxml_entity_resolver { + zend_fcall_info fci; + zend_fcall_info_cache fcc; + } entity_loader; + zend_bool entity_loader_disabled; ZEND_END_MODULE_GLOBALS(libxml) typedef struct _libxml_doc_props {