Skip to content

Commit 70203c7

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix GH-16237: Segmentation fault when cloning SoapServer
2 parents cb04417 + eb02ad0 commit 70203c7

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ PHP NEWS
9090
. Fixed bug GHSA-9pqp-7h25-4f32 (Erroneous parsing of multipart form data).
9191
(CVE-2024-8925) (Arnaud)
9292

93+
- SOAP:
94+
. Fixed bug GH-16237 (Segmentation fault when cloning SoapServer). (nielsdos)
95+
9396
- Standard:
9497
. Fixed bug GH-16053 (Assertion failure in Zend/zend_hash.c). (Arnaud)
9598
. Fixed bug GH-15169 (stack overflow when var serialization in

ext/soap/soap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ PHP_MINIT_FUNCTION(soap)
508508
memcpy(&soap_server_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
509509
soap_server_object_handlers.offset = XtOffsetOf(soap_server_object, std);
510510
soap_server_object_handlers.free_obj = soap_server_object_free;
511+
soap_server_object_handlers.clone_obj = NULL;
511512

512513
/* Register SoapFault class */
513514
soap_fault_class_entry = register_class_SoapFault(zend_ce_exception);

ext/soap/tests/bugs/gh16237.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
GH-16237 (Segmentation fault when cloning SoapServer)
3+
--EXTENSIONS--
4+
soap
5+
--FILE--
6+
<?php
7+
8+
$server = new SoapServer(null, ['uri'=>"http://testuri.org"]);
9+
try {
10+
clone $server;
11+
} catch (Error $e) {
12+
echo $e->getMessage(), "\n";
13+
}
14+
15+
?>
16+
--EXPECT--
17+
Trying to clone an uncloneable object of class SoapServer

0 commit comments

Comments
 (0)