summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-10-15 10:19:43 +0800
committerXinchen Hui <laruence@gmail.com>2015-10-15 10:19:43 +0800
commita2cfcdfbe9f9ee18388b8ca1d788f43373fec31a (patch)
treeab1a5e251534cc637256a2710c8a4403edc7d468
parentb610d740fdc89cdb3fe021d3b5d75a92b0481350 (diff)
downloadphp-git-a2cfcdfbe9f9ee18388b8ca1d788f43373fec31a.tar.gz
Fixed bug #70709 (SOAP Client generates Segfault)
-rw-r--r--NEWS3
-rw-r--r--ext/soap/php_http.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 0615114ebf..b1f6f043ca 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ PHP NEWS
- Core:
. Fixed bug #70689 (Exception handler does not work as expected). (Laruence)
+- SOAP:
+ . Fixed bug #70709 (SOAP Client generates Segfault). (Laruence)
+
15 Oct 2015, PHP 7.0.0 RC 5
- Core:
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index de599b229a..005d3af196 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -1419,7 +1419,12 @@ static zend_string* get_http_body(php_stream *stream, int close, char *headers)
}
return NULL;
}
- http_buf = zend_string_realloc(http_buf, http_buf_size + buf_size, 0);
+
+ if (http_buf) {
+ http_buf = zend_string_realloc(http_buf, http_buf_size + buf_size, 0);
+ } else {
+ http_buf = zend_string_alloc(buf_size, 0);
+ }
while (len_size < buf_size) {
int len_read = php_stream_read(stream, http_buf->val + http_buf_size, buf_size - len_size);