]> granicus.if.org Git - php/commitdiff
Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i)
authorXinchen Hui <laruence@gmail.com>
Tue, 16 May 2017 11:32:13 +0000 (19:32 +0800)
committerXinchen Hui <laruence@gmail.com>
Tue, 16 May 2017 11:32:13 +0000 (19:32 +0800)
NEWS
main/php_ini.c

diff --git a/NEWS b/NEWS
index 7d55403b7e3151583ffa8abe39557c3b08eea41b..e56599046666ea64d20a7d3b8178c62c4c72d022 100644 (file)
--- 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)
 
index 79c9d093213ff1c55df5b64045d8cb634eddc429..7d09fbcfad206c7b3fb5ffc593b31585fad3436a 100644 (file)
@@ -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;