com php-src: Fixed bug #70709 (SOAP Client generates Segfault): NEWS ext/soap/php_http.c
| From: | Xinchen Hui | Date: | Thu, 15 Oct 2015 02:19:43 +0000 |
| Subject: | com php-src: Fixed bug #70709 (SOAP Client generates Segfault): NEWS ext/soap/php_http.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89406@lists.php.net to get a copy of this message | ||
Commit: a2cfcdfbe9f9ee18388b8ca1d788f43373fec31a
Author: Xinchen Hui <laruence@gmail.com> Thu, 15 Oct 2015 10:19:43 +0800
Parents: b610d740fdc89cdb3fe021d3b5d75a92b0481350
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a2cfcdfbe9f9ee18388b8ca1d788f43373fec31a
Log:
Fixed bug #70709 (SOAP Client generates Segfault)
Bugs:
https://bugs.php.net/70709
Changed paths:
M NEWS
M ext/soap/php_http.c
Diff:
diff --git a/NEWS b/NEWS
index 0615114..b1f6f04 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 de599b2..005d3af 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);