mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix GH-16237: Segmentation fault when cloning SoapServer
This commit is contained in:
@@ -508,6 +508,7 @@ PHP_MINIT_FUNCTION(soap)
|
|||||||
memcpy(&soap_server_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
|
memcpy(&soap_server_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
|
||||||
soap_server_object_handlers.offset = XtOffsetOf(soap_server_object, std);
|
soap_server_object_handlers.offset = XtOffsetOf(soap_server_object, std);
|
||||||
soap_server_object_handlers.free_obj = soap_server_object_free;
|
soap_server_object_handlers.free_obj = soap_server_object_free;
|
||||||
|
soap_server_object_handlers.clone_obj = NULL;
|
||||||
|
|
||||||
/* Register SoapFault class */
|
/* Register SoapFault class */
|
||||||
soap_fault_class_entry = register_class_SoapFault(zend_ce_exception);
|
soap_fault_class_entry = register_class_SoapFault(zend_ce_exception);
|
||||||
|
|||||||
17
ext/soap/tests/bugs/gh16237.phpt
Normal file
17
ext/soap/tests/bugs/gh16237.phpt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
--TEST--
|
||||||
|
GH-16237 (Segmentation fault when cloning SoapServer)
|
||||||
|
--EXTENSIONS--
|
||||||
|
soap
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$server = new SoapServer(null, ['uri'=>"http://testuri.org"]);
|
||||||
|
try {
|
||||||
|
clone $server;
|
||||||
|
} catch (Error $e) {
|
||||||
|
echo $e->getMessage(), "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
Trying to clone an uncloneable object of class SoapServer
|
||||||
Reference in New Issue
Block a user