mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix trampoline leak in xpath callables
Closes GH-15009.
This commit is contained in:
parent
5471f3d922
commit
a59103feed
5 changed files with 54 additions and 4 deletions
|
@ -707,11 +707,12 @@ PHP_METHOD(XSLTProcessor, registerPHPFunctionNS)
|
|||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
if (zend_string_equals_literal(namespace, "http://php.net/xsl")) {
|
||||
zend_release_fcall_info_cache(&fcc);
|
||||
zend_argument_value_error(1, "must not be \"http://php.net/xsl\" because it is reserved by PHP");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
php_dom_xpath_callbacks_update_single_method_handler(
|
||||
if (php_dom_xpath_callbacks_update_single_method_handler(
|
||||
&intern->xpath_callbacks,
|
||||
NULL,
|
||||
namespace,
|
||||
|
@ -719,7 +720,9 @@ PHP_METHOD(XSLTProcessor, registerPHPFunctionNS)
|
|||
&fcc,
|
||||
PHP_DOM_XPATH_CALLBACK_NAME_VALIDATE_NCNAME,
|
||||
NULL
|
||||
);
|
||||
) != SUCCESS) {
|
||||
zend_release_fcall_info_cache(&fcc);
|
||||
}
|
||||
}
|
||||
|
||||
/* {{{ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue