[SOAP] PECL::SOAP bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 
I have found a problem in PECL::SOAP extension in the HTTP layer.
There is a bug in php_http.c in a piece of code which handles chunked data as a response from soap server. This bug leads to infinite loop when decoding chunked response. I enclose a patch which fixes the problem. 
 
Can someone check it and commit to CVS ? 
 
Thanks
 
Marek


--- php_http.c.orig	2003-08-21 13:21:11.000000000 +0200
+++ php_http.c	2003-08-21 13:21:11.000000000 +0200
@@ -385,10 +385,10 @@
 				http_buf = erealloc(http_buf, http_buf_size + buf_size + 1);
 				len_size = 0;
 				
-				while (http_buf_size < buf_size) {
+				while (len_size < buf_size) {
 					len_size += php_stream_read(stream, http_buf + http_buf_size, buf_size - len_size);
-					http_buf_size += len_size;
 				}
+				http_buf_size += len_size;
 				
 				/* Eat up '\r' '\n' */
 				php_stream_getc(stream);php_stream_getc(stream);



-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux