File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ PHP NEWS
13
13
. Fix cloning of CURLOPT_POSTFIELDS when using the clone operator instead
14
14
of the curl_copy_handle() function to clone a CurlHandle. (timwolla)
15
15
16
+ - Soap:
17
+ . Fixed bug GH-19784 (SoapServer memory leak). (nielsdos)
18
+
16
19
- Standard:
17
20
. Fixed bug GH-12265 (Cloning an object breaks serialization recursion).
18
21
(nielsdos)
Original file line number Diff line number Diff line change @@ -880,7 +880,13 @@ PHP_METHOD(SoapServer, __construct)
880
880
service -> soap_functions .ft = zend_new_array (0 );
881
881
882
882
if (wsdl ) {
883
- service -> sdl = get_sdl (ZEND_THIS , ZSTR_VAL (wsdl ), cache_wsdl );
883
+ zend_try {
884
+ service -> sdl = get_sdl (ZEND_THIS , ZSTR_VAL (wsdl ), cache_wsdl );
885
+ } zend_catch {
886
+ xmlCharEncCloseFunc (service -> encoding );
887
+ service -> encoding = NULL ;
888
+ zend_bailout ();
889
+ } zend_end_try ();
884
890
if (service -> uri == NULL ) {
885
891
if (service -> sdl -> target_ns ) {
886
892
service -> uri = estrdup (service -> sdl -> target_ns );
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-19784 (SoapServer memory leak)
3
+ --EXTENSIONS--
4
+ soap
5
+ --FILE--
6
+ <?php
7
+ $ v_5256 = 'zpHOks6TzpTOlc6WzpfOmM6ZzprOm86czp3Ons6fzqDOoc6jzqTOpc6mzqfOqM6p ' ;
8
+ $ v_5257 = base64_decode ($ v_5256 ,);
9
+ $ v_5238 = array ('encoding ' => $ v_5257 );
10
+ new SoapServer ('foobarbaz ' ,$ v_5238 ,);
11
+ ?>
12
+ --EXPECTF--
13
+ <? xml version="1.0 " encoding="UTF -8 "?>
14
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>%s</faultcode><faultstring>%a
You can’t perform that action at this time.
0 commit comments