Browse Source
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
Fix GH-19784: SoapServer memory leak
pull/19838/head
Niels Dossche
1 month ago
No known key found for this signature in database
GPG Key ID: B8A8AD166DF0E2E5
3 changed files with
24 additions and
1 deletions
-
NEWS
-
ext/soap/soap.c
-
ext/soap/tests/bugs/gh19784.phpt
|
|
|
@ -17,6 +17,9 @@ PHP NEWS |
|
|
|
. Fixed bug GH-19669 (assertion failure in zend_jit_trace_type_to_info_ex). |
|
|
|
(Arnaud) |
|
|
|
|
|
|
|
- Soap: |
|
|
|
. Fixed bug GH-19784 (SoapServer memory leak). (nielsdos) |
|
|
|
|
|
|
|
- Standard: |
|
|
|
. Fixed bug GH-12265 (Cloning an object breaks serialization recursion). |
|
|
|
(nielsdos) |
|
|
|
|
|
|
|
@ -1002,7 +1002,13 @@ PHP_METHOD(SoapServer, __construct) |
|
|
|
service->soap_functions.ft = zend_new_array(0); |
|
|
|
|
|
|
|
if (wsdl) { |
|
|
|
service->sdl = get_sdl(ZEND_THIS, ZSTR_VAL(wsdl), cache_wsdl); |
|
|
|
zend_try { |
|
|
|
service->sdl = get_sdl(ZEND_THIS, ZSTR_VAL(wsdl), cache_wsdl); |
|
|
|
} zend_catch { |
|
|
|
xmlCharEncCloseFunc(service->encoding); |
|
|
|
service->encoding = NULL; |
|
|
|
zend_bailout(); |
|
|
|
} zend_end_try(); |
|
|
|
if (service->uri == NULL) { |
|
|
|
if (service->sdl->target_ns) { |
|
|
|
service->uri = estrdup(service->sdl->target_ns); |
|
|
|
|
|
|
|
@ -0,0 +1,14 @@ |
|
|
|
--TEST-- |
|
|
|
GH-19784 (SoapServer memory leak) |
|
|
|
--EXTENSIONS-- |
|
|
|
soap |
|
|
|
--FILE-- |
|
|
|
<?php |
|
|
|
$v_5256 = 'zpHOks6TzpTOlc6WzpfOmM6ZzprOm86czp3Ons6fzqDOoc6jzqTOpc6mzqfOqM6p'; |
|
|
|
$v_5257 = base64_decode($v_5256,); |
|
|
|
$v_5238 = array('encoding' => $v_5257); |
|
|
|
new SoapServer('foobarbaz',$v_5238,); |
|
|
|
?> |
|
|
|
--EXPECTF-- |
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>%s</faultcode><faultstring>%a |