summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2012-03-08 20:14:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2012-03-08 20:14:26 +0000
commitb61f335b9da857e210248c13990bbae1b84174f1 (patch)
treed6563ad0fae10ac66022691f3c4077f612d63990
parentecf87a96b9800dc97a6b39ca367213f0a738619b (diff)
downloadphp-git-b61f335b9da857e210248c13990bbae1b84174f1.tar.gz
Fixed bug #60842, #51775 (Chunked response parsing error when chunksize length line is > 10 bytes).
-rw-r--r--NEWS2
-rw-r--r--ext/soap/php_http.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 499f24c05f..9503ce01b3 100644
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,8 @@ PHP NEWS
- 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)
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index 9dea5f71b2..c414bba72b 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -1311,15 +1311,15 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r
}
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;