From: Christoph M. Becker Date: Tue, 30 Aug 2016 00:08:50 +0000 (+0200) Subject: Merge branch 'PHP-5.6' into PHP-7.0 X-Git-Tag: php-7.0.11RC1~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65f0c163f929e48162efc3491fee918bb5c4c280;p=php Merge branch 'PHP-5.6' into PHP-7.0 --- 65f0c163f929e48162efc3491fee918bb5c4c280 diff --cc NEWS index 4eb5a7d531,a05fa844c5..198af3ce26 --- a/NEWS +++ b/NEWS @@@ -80,18 -48,11 +80,20 @@@ PH . Fixed bug #72278 (getimagesize returning FALSE on valid jpg). (cmb) . Fixed bug #65550 (get_browser() incorrectly parses entries with "+" sign). (cmb) + . Fixed bug #71882 (Negative ftruncate() on php://memory exhausts memory). + (cmb) +- Streams: + . Fixed bug #72853 (stream_set_blocking doesn't work). (Laruence) + . Fixed bug #72764 (ftps:// opendir wrapper data channel encryption fails + with IIS FTP 7.5, 8.5). (vhuk) + +- Sysvshm: + . Fixed bug #72858 (shm_attach null dereference). (Anatol) + - XML: . Fixed bug #72085 (SEGV on unknown address zif_xml_parse). (cmb) + . Fixed bug #72714 (_xml_startElementHandler() segmentation fault). (cmb) - ZIP: . Fixed bug #68302 (impossible to compile php with zip support). (cmb) diff --cc ext/standard/file.c index 5c90b30559,d346ed9e92..e228ce6121 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@@ -1546,10 -1512,15 +1546,15 @@@ PHP_NAMED_FUNCTION(php_if_ftruncate RETURN_FALSE; } + if (size < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Negative size is not supported"); ++ php_error_docref(NULL, E_WARNING, "Negative size is not supported"); + RETURN_FALSE; + } + - PHP_STREAM_TO_ZVAL(stream, &fp); + PHP_STREAM_TO_ZVAL(stream, fp); if (!php_stream_truncate_supported(stream)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't truncate this stream!"); + php_error_docref(NULL, E_WARNING, "Can't truncate this stream!"); RETURN_FALSE; }