svn commit: r444024 - in branches/2017Q2/lang: php70 php70/files php71 php71/files
Torsten Zuehlsdorff
tz at FreeBSD.org
Wed Jun 21 10:24:18 UTC 2017
Author: tz
Date: Wed Jun 21 10:24:17 2017
New Revision: 444024
URL: https://svnweb.freebsd.org/changeset/ports/444024
Log:
MFH: r443708
lang/php70 and lang/php71: Parse multiple [PATH=] and [HOST=] sections properly
Adding a patch to fix bug #74738 in PHP 7.0 and 7.1:
https://bugs.php.net/bug.php?id=74738
Reported by: Philip Jocks <pj at netzkommune.de>
Approved by: ports-secteam (miwi)
Added:
branches/2017Q2/lang/php70/files/patch-main_php__ini.c
- copied unchanged from r443708, head/lang/php70/files/patch-main_php__ini.c
branches/2017Q2/lang/php71/files/patch-main_php__ini.c
- copied unchanged from r443708, head/lang/php71/files/patch-main_php__ini.c
Modified:
branches/2017Q2/lang/php70/Makefile
branches/2017Q2/lang/php71/Makefile
Directory Properties:
branches/2017Q2/ (props changed)
Modified: branches/2017Q2/lang/php70/Makefile
==============================================================================
--- branches/2017Q2/lang/php70/Makefile Wed Jun 21 09:30:16 2017 (r444023)
+++ branches/2017Q2/lang/php70/Makefile Wed Jun 21 10:24:17 2017 (r444024)
@@ -3,7 +3,7 @@
PORTNAME= php70
PORTVERSION= 7.0.20
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= lang devel www
MASTER_SITES= PHP/distributions
DISTNAME= php-${PORTVERSION}
Copied: branches/2017Q2/lang/php70/files/patch-main_php__ini.c (from r443708, head/lang/php70/files/patch-main_php__ini.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2017Q2/lang/php70/files/patch-main_php__ini.c Wed Jun 21 10:24:17 2017 (r444024, copy of r443708, head/lang/php70/files/patch-main_php__ini.c)
@@ -0,0 +1,31 @@
+--- main/php_ini.c.orig 2017-06-14 13:27:29 UTC
++++ main/php_ini.c
+@@ -280,7 +280,7 @@ static void php_ini_parser_cb(zval *arg1
+ size_t key_len;
+
+ /* PATH sections */
+- if (zend_string_equals_literal_ci(Z_STR_P(arg1), "PATH")) {
++ if (!zend_binary_strncasecmp(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), "PATH", sizeof("PATH") - 1, sizeof("PATH") - 1)) {
+ 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
+ TRANSLATE_SLASHES_LOWER(key);
+
+ /* HOST sections */
+- } else if (zend_string_equals_literal_ci(Z_STR_P(arg1), "HOST")) {
++ } else if (!zend_binary_strncasecmp(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), "HOST", sizeof("HOST") - 1, sizeof("HOST") - 1)) {
+ key = Z_STRVAL_P(arg1);
+ key = key + sizeof("HOST") - 1;
+ key_len = Z_STRLEN_P(arg1) - sizeof("HOST") + 1;
+@@ -328,7 +328,9 @@ static void php_ini_parser_cb(zval *arg1
+ zend_hash_init(Z_ARRVAL(section_arr), 8, NULL, (dtor_func_t) config_zval_dtor, 1);
+ entry = zend_hash_str_update(target_hash, key, key_len, §ion_arr);
+ }
+- active_ini_hash = Z_ARRVAL_P(entry);
++ if (Z_TYPE_P(entry) == IS_ARRAY) {
++ active_ini_hash = Z_ARRVAL_P(entry);
++ }
+ }
+ }
+ break;
Modified: branches/2017Q2/lang/php71/Makefile
==============================================================================
--- branches/2017Q2/lang/php71/Makefile Wed Jun 21 09:30:16 2017 (r444023)
+++ branches/2017Q2/lang/php71/Makefile Wed Jun 21 10:24:17 2017 (r444024)
@@ -3,7 +3,7 @@
PORTNAME= php71
PORTVERSION= 7.1.6
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= lang devel www
MASTER_SITES= PHP/distributions
DISTNAME= php-${PORTVERSION}
Copied: branches/2017Q2/lang/php71/files/patch-main_php__ini.c (from r443708, head/lang/php71/files/patch-main_php__ini.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2017Q2/lang/php71/files/patch-main_php__ini.c Wed Jun 21 10:24:17 2017 (r444024, copy of r443708, head/lang/php71/files/patch-main_php__ini.c)
@@ -0,0 +1,40 @@
+--- main/php_ini.c.orig 2017-06-14 13:23:49 UTC
++++ main/php_ini.c
+@@ -280,7 +280,7 @@ static void php_ini_parser_cb(zval *arg1
+ size_t key_len;
+
+ /* PATH sections */
+- if (zend_string_equals_literal_ci(Z_STR_P(arg1), "PATH")) {
++ if (!zend_binary_strncasecmp(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), "PATH", sizeof("PATH") - 1, sizeof("PATH") - 1)) {
+ 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
+ TRANSLATE_SLASHES_LOWER(key);
+
+ /* HOST sections */
+- } else if (zend_string_equals_literal_ci(Z_STR_P(arg1), "HOST")) {
++ } else if (!zend_binary_strncasecmp(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), "HOST", sizeof("HOST") - 1, sizeof("HOST") - 1)) {
+ key = Z_STRVAL_P(arg1);
+ key = key + sizeof("HOST") - 1;
+ key_len = Z_STRLEN_P(arg1) - sizeof("HOST") + 1;
+@@ -328,7 +328,9 @@ static void php_ini_parser_cb(zval *arg1
+ zend_hash_init(Z_ARRVAL(section_arr), 8, NULL, (dtor_func_t) config_zval_dtor, 1);
+ entry = zend_hash_str_update(target_hash, key, key_len, §ion_arr);
+ }
+- active_ini_hash = Z_ARRVAL_P(entry);
++ if (Z_TYPE_P(entry) == IS_ARRAY) {
++ active_ini_hash = Z_ARRVAL_P(entry);
++ }
+ }
+ }
+ break;
+@@ -638,7 +640,7 @@ int php_init_config(void)
+ }
+ if (!debpath[0]) {
+ /* empty string means default builtin value
+- to allow "/foo/php.d:" or ":/foo/php.d" */
++ to allow "/foo/phd.d:" or ":/foo/php.d" */
+ debpath = PHP_CONFIG_FILE_SCAN_DIR;
+ }
+ lenpath = (int)strlen(debpath);
More information about the svn-ports-branches
mailing list