dmitry Mon Jul 19 08:53:29 2004 EDT
Added files:
/php-src/ext/soap/tests/bugs bug29061.phpt bug29061.wsdl
Modified files:
/php-src NEWS
/php-src/ext/soap soap.c
Log:
Fixed bug #29061 (soap extension segfaults).
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1764&r2=1.1765&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1764 php-src/NEWS:1.1765
--- php-src/NEWS:1.1764 Fri Jul 16 20:05:31 2004
+++ php-src/NEWS Mon Jul 19 08:53:28 2004
@@ -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)
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.111&r2=1.112&ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.111 php-src/ext/soap/soap.c:1.112
--- php-src/ext/soap/soap.c:1.111 Mon Jul 19 07:38:40 2004
+++ php-src/ext/soap/soap.c Mon Jul 19 08:53:29 2004
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.111 2004/07/19 11:38:40 dmitry Exp $ */
+/* $Id: soap.c,v 1.112 2004/07/19 12:53:29 dmitry Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1993,10 +1993,18 @@
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);
http://cvs.php.net/co.php/php-src/ext/soap/tests/bugs/bug29061.phpt?r=1.1&p=1
Index: php-src/ext/soap/tests/bugs/bug29061.phpt
+++ php-src/ext/soap/tests/bugs/bug29061.phpt
--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
http://cvs.php.net/co.php/php-src/ext/soap/tests/bugs/bug29061.wsdl?r=1.1&p=1
Index: php-src/ext/soap/tests/bugs/bug29061.wsdl
+++ php-src/ext/soap/tests/bugs/bug29061.wsdl
<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>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php