git: 11d48ddebb9c - main - lang/php74: Upgrade from 7.4.25 to 7.4.26

From: Torsten Zuehlsdorff <tz_at_FreeBSD.org>
Date: Sat, 20 Nov 2021 19:31:49 UTC
The branch main has been updated by tz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=11d48ddebb9c0951afead066cdb578270182010a

commit 11d48ddebb9c0951afead066cdb578270182010a
Author:     Torsten Zuehlsdorff <tz@FreeBSD.org>
AuthorDate: 2021-11-20 19:27:05 +0000
Commit:     Torsten Zuehlsdorff <tz@FreeBSD.org>
CommitDate: 2021-11-20 19:31:39 +0000

    lang/php74: Upgrade from 7.4.25 to 7.4.26
    
        Core:
            Fixed bug #81518 (Header injection via default_mimetype / default_charset).
        Date:
            Fixed bug #81500 (Interval serialization regression since 7.3.14 / 7.4.2).
        MBString:
            Fixed bug #76167 (mbstring may use pointer from some previous request).
        MySQLi:
            Fixed bug #81494 (Stopped unbuffered query does not throw error).
        PCRE:
            Fixed bug #81424 (PCRE2 10.35 JIT performance regression).
        Streams:
            Fixed bug #54340 (Memory corruption with user_filter).
        XML:
            Fixed bug #79971 (special character is breaking the path in xml function). (CVE-2021-21707)
    
    Also include a patch to fix issue 259725:
    dns_get_record fails when requested record doesn't exist
    
    PR:             259725
    Reported by:    fsbruva@yahoo.com
    Sponsored by:   Bounce Experts
---
 devel/php74-intl/Makefile                      |  1 -
 devel/php74-intl/files/patch-icu70             | 38 --------------------------
 lang/php74/Makefile                            |  2 +-
 lang/php74/distinfo                            |  6 ++--
 lang/php74/files/patch-ext_standard_dns.c      | 21 ++++++++++++++
 lang/php74/files/patch-ext_standard_php__dns.h | 24 ++++++++++++++++
 6 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/devel/php74-intl/Makefile b/devel/php74-intl/Makefile
index 60ddbc3e821f..482d1fced016 100644
--- a/devel/php74-intl/Makefile
+++ b/devel/php74-intl/Makefile
@@ -1,4 +1,3 @@
-PORTREVISION=	1
 CATEGORIES=	devel
 
 MASTERDIR=	${.CURDIR}/../../lang/php74
diff --git a/devel/php74-intl/files/patch-icu70 b/devel/php74-intl/files/patch-icu70
deleted file mode 100644
index 1bfee73209b9..000000000000
--- a/devel/php74-intl/files/patch-icu70
+++ /dev/null
@@ -1,38 +0,0 @@
-Regressed by https://github.com/unicode-org/icu/commit/633438f8da99
-
-In file included from breakiterator/breakiterator_class.cpp:23:
-breakiterator/codepointiterator_internal.h:42:17: error: virtual function 'operator==' has a different return type ('UBool' (aka 'signed char')) than the function it overrides (which has return type 'bool')
-                virtual UBool operator==(const BreakIterator& that) const;
-                        ~~~~~ ^
-/usr/local/include/unicode/brkiter.h:127:18: note: overridden virtual function is here
-    virtual bool operator==(const BreakIterator&) const = 0;
-            ~~~~ ^
-
---- breakiterator/codepointiterator_internal.cpp.orig	2021-09-21 11:23:20 UTC
-+++ breakiterator/codepointiterator_internal.cpp
-@@ -75,7 +75,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
- 	clearCurrentCharIter();
- }
- 
-+#if U_ICU_VERSION_MAJOR_NUM < 70
- UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
-+#else
-+bool CodePointBreakIterator::operator==(const BreakIterator& that) const
-+#endif
- {
- 	if (typeid(*this) != typeid(that)) {
- 		return FALSE;
---- breakiterator/codepointiterator_internal.h.orig	2021-09-21 11:23:20 UTC
-+++ breakiterator/codepointiterator_internal.h
-@@ -39,7 +39,11 @@ namespace PHP {
- 
- 		virtual ~CodePointBreakIterator();
- 
-+#if U_ICU_VERSION_MAJOR_NUM < 70
- 		virtual UBool operator==(const BreakIterator& that) const;
-+#else
-+		virtual bool operator==(const BreakIterator& that) const;
-+#endif
- 
- 		virtual CodePointBreakIterator* clone(void) const;
- 
diff --git a/lang/php74/Makefile b/lang/php74/Makefile
index 25920456bb90..37e56b15adf3 100644
--- a/lang/php74/Makefile
+++ b/lang/php74/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	php74
-DISTVERSION=	7.4.25
+DISTVERSION=	7.4.26
 PORTREVISION?=	0
 CATEGORIES?=	lang devel www
 MASTER_SITES=	PHP/distributions
diff --git a/lang/php74/distinfo b/lang/php74/distinfo
index 761533b3c767..0c166044ea81 100644
--- a/lang/php74/distinfo
+++ b/lang/php74/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1635020178
-SHA256 (php-7.4.25.tar.xz) = 12a758f1d7fee544387a28d3cf73226f47e3a52fb3049f07fcc37d156d393c0a
-SIZE (php-7.4.25.tar.xz) = 10376304
+TIMESTAMP = 1637348951
+SHA256 (php-7.4.26.tar.xz) = e305b3aafdc85fa73a81c53d3ce30578bc94d1633ec376add193a1e85e0f0ef8
+SIZE (php-7.4.26.tar.xz) = 10420236
diff --git a/lang/php74/files/patch-ext_standard_dns.c b/lang/php74/files/patch-ext_standard_dns.c
new file mode 100644
index 000000000000..19e539a41b1e
--- /dev/null
+++ b/lang/php74/files/patch-ext_standard_dns.c
@@ -0,0 +1,21 @@
+--- ext/standard/dns.c.orig	2021-10-19 15:18:17 UTC
++++ ext/standard/dns.c
+@@ -808,6 +808,7 @@ PHP_FUNCTION(dns_get_record)
+ 	zend_long type_param = PHP_DNS_ANY;
+ 	zval *authns = NULL, *addtl = NULL;
+ 	int type_to_fetch;
++	int dns_errno;
+ #if defined(HAVE_DNS_SEARCH)
+ 	struct sockaddr_storage from;
+ 	uint32_t fromsize = sizeof(from);
+@@ -957,8 +958,9 @@ PHP_FUNCTION(dns_get_record)
+ 			n = php_dns_search(handle, hostname, C_IN, type_to_fetch, answer.qb2, sizeof answer);
+ 
+ 			if (n < 0) {
++				dns_errno = php_dns_errno(handle);
+ 				php_dns_free_handle(handle);
+-				switch (h_errno) {
++				switch (dns_errno) {
+ 					case NO_DATA:
+ 					case HOST_NOT_FOUND:
+ 						continue;
diff --git a/lang/php74/files/patch-ext_standard_php__dns.h b/lang/php74/files/patch-ext_standard_php__dns.h
new file mode 100644
index 000000000000..4fadb68eda60
--- /dev/null
+++ b/lang/php74/files/patch-ext_standard_php__dns.h
@@ -0,0 +1,24 @@
+--- ext/standard/php_dns.h.orig	2021-10-19 15:18:17 UTC
++++ ext/standard/php_dns.h
+@@ -26,6 +26,7 @@
+     	((int)dns_search(res, dname, class, type, (char *) answer, anslen, (struct sockaddr *)&from, &fromsize))
+ #define php_dns_free_handle(res) \
+ 		dns_free(res)
++#define php_dns_errno(handle) h_errno
+ 
+ #elif defined(HAVE_RES_NSEARCH)
+ #define php_dns_search(res, dname, class, type, answer, anslen) \
+@@ -39,11 +40,13 @@
+ 			res_nclose(res); \
+ 			php_dns_free_res(res)
+ #endif
++#define php_dns_errno(handle) handle->res_h_errno
+ 
+ #elif defined(HAVE_RES_SEARCH)
+ #define php_dns_search(res, dname, class, type, answer, anslen) \
+ 			res_search(dname, class, type, answer, anslen)
+ #define php_dns_free_handle(res) /* noop */
++#define php_dns_errno(handle) h_errno
+ 
+ #endif
+