From:             john dot navratil at sbcglobal dot net
Operating system: Solaris 8
PHP version:      5.2.6
PHP Bug Type:     SOAP related
Bug description:  SOAP client buffer overflow

Description:
------------
This is related to bug 43437.  In fact, I posted this as a comment to that
bug, but there doesn't appear to be much action there.  Sorry if I am
posting a duplicate.

A segmentation fault is generated when a client invokes a SOAP method via
_doRequest() after what appears to be a buffer overflow in a previous
request.  The test code return a string of bytes.  Attempting to return a
string 7443 X's succeeds.  7444 fails with
message: PHP Warning:  SoapClient::__doRequest(): 1 bytes of buffered
data lost during stream conversion!.  After failure, a second SOAP
invocation results in a segmentation fault.

FWIW: Hitting the same SOAP server with a VBScript test script doesn't
exhibit the error.

Reproduce code:
---------------
SOAP Server Example -------:
<?
function myMethod()
{
  $rslt = str_repeat('x', 7444);
  return $rslt;
}

ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("http://myURL/my.wsdl";);
$server->addFunction("myMethod");
?>

SOAP Client test code -------:

<?php
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient("http://myURL/my.wsdl";);
try
{
        print($client->myMethod());
        print($client->myMethod());
}
catch (SoapFault $exception)
{
        echo $exception;
}
?>


Expected result:
----------------
A stream of 'X's

Actual result:
--------------
A segmentation fault

-- 
Edit bug report at http://bugs.php.net/?id=45238&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45238&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45238&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45238&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45238&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45238&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45238&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45238&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45238&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45238&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45238&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45238&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45238&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45238&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45238&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45238&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45238&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45238&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45238&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45238&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45238&r=mysqlcfg

Reply via email to