mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
Fixed bug #29061 (soap extension segfaults).
This commit is contained in:
parent
e35bc2e2b4
commit
e0f33c589f
1
NEWS
1
NEWS
@ -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)
|
||||
|
@ -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] = ¶m1;
|
||||
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] = ¶m2;
|
||||
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] = ¶m3;
|
||||
ZVAL_LONG(params[3], version);
|
||||
|
12
ext/soap/tests/bugs/bug29061.phpt
Normal file
12
ext/soap/tests/bugs/bug29061.phpt
Normal 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
|
41
ext/soap/tests/bugs/bug29061.wsdl
Normal file
41
ext/soap/tests/bugs/bug29061.wsdl
Normal 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>
|
Loading…
Reference in New Issue
Block a user