com php-src: Fixed bug #70715 (Segmentation fault inside soap client): NEWS ext/soap/php_http.c

From: Date: Thu, 15 Oct 2015 10:46:57 +0000
Subject: com php-src: Fixed bug #70715 (Segmentation fault inside soap client): NEWS ext/soap/php_http.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89408@lists.php.net to get a copy of this message
Commit: 88a69ffa58e8fdc8409bb567a2bd6b75b4232c41 Author: Xinchen Hui <laruence@gmail.com> Thu, 15 Oct 2015 18:46:57 +0800 Parents: a2005cec5ce1208df901e25c4ed7d834b3d7db36 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=88a69ffa58e8fdc8409bb567a2bd6b75b4232c41 Log: Fixed bug #70715 (Segmentation fault inside soap client) Bugs: https://bugs.php.net/70715 Changed paths: M NEWS M ext/soap/php_http.c Diff: diff --git a/NEWS b/NEWS index b1f6f04..55f82f0 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ PHP NEWS . Fixed bug #70689 (Exception handler does not work as expected). (Laruence) - SOAP: + . Fixed bug #70715 (Segmentation fault inside soap client). (Laruence) . Fixed bug #70709 (SOAP Client generates Segfault). (Laruence) 15 Oct 2015, PHP 7.0.0 RC 5 diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 005d3af..b9e45f6 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;

« previous php.cvs (#89408) next »