com php-src: Fixed bug #74600 (crash (SIGSEGV) in _zend_has h_add_or_update_i): NEWS main/php_ini.c
[email protected] (Xinchen Hui)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 9f49ebb5baf1e52ce3184ea34977274040f835e9 Author: Xinchen Hui <[email protected]> Tue, 16 May 2017 19:32:13 +0800 Parents: 89dd7fb328589a9aa1719aa7c642a1378c5a926e Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9f49ebb5baf1e52ce3184ea34977274040f835e9 Log: Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i) Bugs: https://bugs.php.net/74600 Changed paths: M NEWS M main/php_ini.c Diff: diff --git a/NEWS b/NEWS index 7d55403..e565990 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2017 PHP 7.0.20 - Core: + . Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i). + (Laruence) . Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST). (Laruence) diff --git a/main/php_ini.c b/main/php_ini.c index 79c9d09..7d09fbc 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -280,7 +280,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t size_t key_len; /* PATH sections */ - if (!strncasecmp(Z_STRVAL_P(arg1), "PATH", sizeof("PATH") - 1)) { + if (zend_string_equals_literal_ci(Z_STR_P(arg1), "PATH")) { key = Z_STRVAL_P(arg1); key = key + sizeof("PATH") - 1; key_len = Z_STRLEN_P(arg1) - sizeof("PATH") + 1; @@ -291,7 +291,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t TRANSLATE_SLASHES_LOWER(key); /* HOST sections */ - } else if (!strncasecmp(Z_STRVAL_P(arg1), "HOST", sizeof("HOST") - 1)) { + } else if (zend_string_equals_literal_ci(Z_STR_P(arg1), "HOST")) { key = Z_STRVAL_P(arg1); key = key + sizeof("HOST") - 1; key_len = Z_STRLEN_P(arg1) - sizeof("HOST") + 1;