iliaa                                    Thu, 08 Mar 2012 20:14:26 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=324027

Log:
Fixed bug #60842, #51775 (Chunked response parsing error when chunksize length 
line is > 10 bytes).

Bugs: https://bugs.php.net/60842 (Open) CR+LF bug on chunk_size
      https://bugs.php.net/51775 (Feedback) Chunked response parsing error
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/soap/php_http.c
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/ext/soap/php_http.c
    U   php/php-src/trunk/ext/soap/php_http.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2012-03-08 19:31:57 UTC (rev 324026)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-03-08 20:14:26 UTC (rev 324027)
@@ -56,6 +56,8 @@

 - SOAP
   . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
+  . Fixed bug #60842, #51775 (Chunked response parsing error when
+    chunksize length line is > 10 bytes). (Ilia)
   . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
     User-Agent header). (carloschilazo at gmail dot com)


Modified: php/php-src/branches/PHP_5_3/ext/soap/php_http.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/soap/php_http.c    2012-03-08 19:31:57 UTC 
(rev 324026)
+++ php/php-src/branches/PHP_5_3/ext/soap/php_http.c    2012-03-08 20:14:26 UTC 
(rev 324027)
@@ -1311,15 +1311,15 @@
        }

        if (header_chunked) {
-               char ch, done, chunk_size[10], headerbuf[8192];
+               char ch, done, headerbuf[8192];

                done = FALSE;

                while (!done) {
                        int buf_size = 0;

-                       php_stream_gets(stream, chunk_size, sizeof(chunk_size));
-                       if (sscanf(chunk_size, "%x", &buf_size) > 0 ) {
+                       php_stream_gets(stream, headerbuf, sizeof(headerbuf));
+                       if (sscanf(headerbuf, "%x", &buf_size) > 0 ) {
                                if (buf_size > 0) {
                                        int len_size = 0;


Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS   2012-03-08 19:31:57 UTC (rev 324026)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-03-08 20:14:26 UTC (rev 324027)
@@ -49,6 +49,8 @@
     SessionHandler::write()). (Ilia)

 - SOAP
+  . Fixed bug #60842, #51775 (Chunked response parsing error when
+    chunksize length line is > 10 bytes). (Ilia)
   . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
     User-Agent header). (carloschilazo at gmail dot com)


Modified: php/php-src/branches/PHP_5_4/ext/soap/php_http.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/soap/php_http.c    2012-03-08 19:31:57 UTC 
(rev 324026)
+++ php/php-src/branches/PHP_5_4/ext/soap/php_http.c    2012-03-08 20:14:26 UTC 
(rev 324027)
@@ -1313,15 +1313,15 @@
        }

        if (header_chunked) {
-               char ch, done, chunk_size[10], headerbuf[8192];
+               char ch, done, headerbuf[8192];

                done = FALSE;

                while (!done) {
                        int buf_size = 0;

-                       php_stream_gets(stream, chunk_size, sizeof(chunk_size));
-                       if (sscanf(chunk_size, "%x", &buf_size) > 0 ) {
+                       php_stream_gets(stream, headerbuf, sizeof(headerbuf));
+                       if (sscanf(headerbuf, "%x", &buf_size) > 0 ) {
                                if (buf_size > 0) {
                                        int len_size = 0;


Modified: php/php-src/trunk/ext/soap/php_http.c
===================================================================
--- php/php-src/trunk/ext/soap/php_http.c       2012-03-08 19:31:57 UTC (rev 
324026)
+++ php/php-src/trunk/ext/soap/php_http.c       2012-03-08 20:14:26 UTC (rev 
324027)
@@ -1313,15 +1313,15 @@
        }

        if (header_chunked) {
-               char ch, done, chunk_size[10], headerbuf[8192];
+               char ch, done, headerbuf[8192];

                done = FALSE;

                while (!done) {
                        int buf_size = 0;

-                       php_stream_gets(stream, chunk_size, sizeof(chunk_size));
-                       if (sscanf(chunk_size, "%x", &buf_size) > 0 ) {
+                       php_stream_gets(stream, headerbuf, sizeof(headerbuf));
+                       if (sscanf(headerbuf, "%x", &buf_size) > 0 ) {
                                if (buf_size > 0) {
                                        int len_size = 0;


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

Reply via email to