diff options
author | Xinchen Hui <laruence@gmail.com> | 2015-10-15 18:46:57 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2015-10-15 18:46:57 +0800 |
commit | 88a69ffa58e8fdc8409bb567a2bd6b75b4232c41 (patch) | |
tree | 9f01e520b11a20ec653117236f49fe16e6ca1eab /ext/soap | |
parent | a2005cec5ce1208df901e25c4ed7d834b3d7db36 (diff) | |
download | php-git-88a69ffa58e8fdc8409bb567a2bd6b75b4232c41.tar.gz |
Fixed bug #70715 (Segmentation fault inside soap client)
Diffstat (limited to 'ext/soap')
-rw-r--r-- | ext/soap/php_http.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 005d3af196..b9e45f61b5 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -1494,7 +1494,11 @@ static zend_string* get_http_body(php_stream *stream, int close, char *headers) } else if (header_close) { do { int len_read; - http_buf = zend_string_realloc(http_buf, http_buf_size + 4096 + 1, 0); + if (http_buf) { + http_buf = zend_string_realloc(http_buf, http_buf_size + 4096, 0); + } else { + http_buf = zend_string_alloc(4096, 0); + } len_read = php_stream_read(stream, http_buf->val + http_buf_size, 4096); if (len_read > 0) { http_buf_size += len_read; |