mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix GH-19784: SoapServer memory leak
This commit is contained in:
3
NEWS
3
NEWS
@@ -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);
|
||||
|
||||
14
ext/soap/tests/bugs/gh19784.phpt
Normal file
14
ext/soap/tests/bugs/gh19784.phpt
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user