Fixed bug #29061 (soap extension segfaults).

This commit is contained in:
Dmitry Stogov 2004-07-19 12:53:29 +00:00
parent e35bc2e2b4
commit e0f33c589f
4 changed files with 64 additions and 2 deletions

1
NEWS
View File

@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2004, PHP 5.1.0
- Fixed bug #29061 (soap extension segfaults). (Dmitry)
- Added zlib stream filter suport. (Sara)
- Changed the implementation of TRUE, FALSE, and NULL from constants to
keywords. (Marcus)

View File

@ -1993,10 +1993,18 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
ZVAL_STRINGL(params[0], buf, buf_size, 0);
INIT_ZVAL(param1);
params[1] = &param1;
ZVAL_STRING(params[1], location, 0);
if (location == NULL) {
ZVAL_NULL(params[1]);
} else {
ZVAL_STRING(params[1], location, 0);
}
INIT_ZVAL(param2);
params[2] = &param2;
ZVAL_STRING(params[2], action, 0);
if (action == NULL) {
ZVAL_NULL(params[2]);
} else {
ZVAL_STRING(params[2], action, 0);
}
INIT_ZVAL(param3);
params[3] = &param3;
ZVAL_LONG(params[3], version);

View File

@ -0,0 +1,12 @@
--TEST--
Bug #29061 (soap extension segfaults)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/bug29061.wsdl", array("exceptions"=>0));
$client->getQuote("ibm");
echo "ok\n";
?>
--EXPECT--
ok

View File

@ -0,0 +1,41 @@
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://
schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/e
ncoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:y="http://new.webservice.namespace" targetNamespace="http
://new.webservice.namespace">
<types>
<xs:schema/>
</types>
<message name="getQuoteResponse">
<part name="parameter" element="" type="xs:string"/>
</message>
<message name="getQuoteRequest">
<part name="String" element="" type="xs:string"/>
</message>
<portType name="SOAPport">
<operation name="getQuote">
<input message="y:getQuoteRequest"/>
<output message="y:getQuoteResponse"/>
</operation>
</portType>
<binding name="bindingName" type="y:SOAPport">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getQuote">
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="myService">
<port name="myPort" binding="y:bindingName">
<soap:address location="test://"/>
</port>
</service>
</definitions>