com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/standard/exec.c

From: Date: Fri, 30 Sep 2016 09:40:55 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/standard/exec.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94795@lists.php.net to get a copy of this message
Commit: dd937129113fb0cc435c579e8308218d119d9726 Author: Christoph M. Becker <cmbecker69@gmx.de> Fri, 30 Sep 2016 11:40:10 +0200 Parents: e60620b97418041c56a94f4f1eb20355b91999c5 e72165bb86aec6fc51dcb4d8d715e18be912ab67 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dd937129113fb0cc435c579e8308218d119d9726 Log: Merge branch 'PHP-5.6' into PHP-7.0 Changed paths: MM NEWS MM ext/standard/exec.c Diff: diff --cc NEWS index 0848c2e,fae5b65..d4b7873 --- a/NEWS +++ b/NEWS @@@ -1,29 -1,18 +1,32 @@@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? 2016, PHP 5.6.28 +?? ??? 2016 PHP 7.0.13 + +- Core: + . Fixed bug #73181 (parse_str() without a second argument leads to crash). + (Nikita) + - Standard: + . Fixed bug #73203 (passing additional_parameters causes mail to fail). (cmb) + -13 Oct 2016, PHP 5.6.27 +13 Oct 2016 PHP 7.0.12 - Core: + . Fixed bug #73067 (__debugInfo crashes when throwing an exception). + (Laruence) . Fixed bug #73025 (Heap Buffer Overflow in virtual_popen of zend_virtual_cwd.c). (cmb) - . Fixed bug #73058 (crypt broken when salt is 'too' long). (Anatol) . Fixed bug #72703 (Out of bounds global memory read in BF_crypt triggered by password_verify). (Anatol) + . Fixed bug #73058 (crypt broken when salt is 'too' long). (Anatol) + . Fixed bug #69579 (Invalid free in extension trait). (John Boehr) + . Fixed bug #73156 (segfault on undefined function). (Dmitry) + . Fixed bug #73163 (PHP hangs if error handler throws while accessing undef + const in default value). (Nikita) + . Fixed bug #73172 (parse error: Invalid numeric literal). (Nikita, Anatol) + +- COM: + . Fixed bug #73126 (Cannot pass parameter 1 by reference). (Anatol) - Filter: . Fixed bug #72972 (Bad filter for the flags FILTER_FLAG_NO_RES_RANGE and diff --cc ext/standard/exec.c index a73d0b4,e0ca914..7bd3ef9 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@@ -361,12 -370,12 +361,12 @@@ PHPAPI zend_string *php_escape_shell_cm } } - cmd[y] = '\0'; + ZSTR_VAL(cmd)[y] = '\0'; - if (y - 1 > cmd_max_len) { + if (y > cmd_max_len + 1) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Escaped command exceeds the allowed length of %d bytes", cmd_max_len); - efree(cmd); - return NULL; + php_error_docref(NULL, E_ERROR, "Escaped command exceeds the allowed length of %d bytes", cmd_max_len); + zend_string_release(cmd); + return ZSTR_EMPTY_ALLOC(); } if ((estimate - y) > 4096) { @@@ -444,16 -453,16 +444,16 @@@ PHPAPI zend_string *php_escape_shell_ar } } - cmd[y++] = '"'; + ZSTR_VAL(cmd)[y++] = '"'; #else - cmd[y++] = '\''; + ZSTR_VAL(cmd)[y++] = '\''; #endif - cmd[y] = '\0'; + ZSTR_VAL(cmd)[y] = '\0'; - if (y - 1 > cmd_max_len) { + if (y > cmd_max_len + 1) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Escaped argument exceeds the allowed length of %d bytes", cmd_max_len); - efree(cmd); - return NULL; + php_error_docref(NULL, E_ERROR, "Escaped argument exceeds the allowed length of %d bytes", cmd_max_len); + zend_string_release(cmd); + return ZSTR_EMPTY_ALLOC(); } if ((estimate - y) > 4096) {

« previous php.cvs (#94795) next »