summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--10756.patch21
-rw-r--r--php-8.1.0-systzdata-v23.patch (renamed from php-8.1.0-systzdata-v22.patch)3
-rw-r--r--php82.spec7
3 files changed, 29 insertions, 2 deletions
diff --git a/10756.patch b/10756.patch
new file mode 100644
index 0000000..b980bf7
--- /dev/null
+++ b/10756.patch
@@ -0,0 +1,21 @@
+From 9f0022064677d180742642f264096a46c09269d3 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 3 Mar 2023 11:12:13 +0100
+Subject: [PATCH] remove assert raising strange behavior with GCC 10
+
+---
+ ext/reflection/php_reflection.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
+index 9a9685e7292e..42fec082c173 100644
+--- a/ext/reflection/php_reflection.c
++++ b/ext/reflection/php_reflection.c
+@@ -1748,7 +1748,6 @@ ZEND_METHOD(ReflectionFunctionAbstract, getClosureUsedVariables)
+
+ zend_op *opline = ops->opcodes + ops->num_args;
+ if (ops->fn_flags & ZEND_ACC_VARIADIC) {
+- ZEND_ASSERT(opline->opcode == ZEND_RECV_VARIADIC);
+ opline++;
+ }
+
diff --git a/php-8.1.0-systzdata-v22.patch b/php-8.1.0-systzdata-v23.patch
index d1c8d90..3157660 100644
--- a/php-8.1.0-systzdata-v22.patch
+++ b/php-8.1.0-systzdata-v23.patch
@@ -5,6 +5,7 @@ Add support for use of the system timezone database, rather
than embedding a copy. Discussed upstream but was not desired.
History:
+r23: fix possible buffer overflow
r22: retrieve tzdata version from /usr/share/zoneinfo/tzdata.zi
r21: adapt for timelib 2021.03 (in 8.1.0)
r20: adapt for timelib 2020.03 (in 8.0.10RC1)
@@ -456,7 +457,7 @@ index e41315efdb..4b6547c0a3 100644
+ size_t n;
+ char *data, *p;
+
-+ data = malloc(3 * sysdb->index_size + 7);
++ data = malloc(3 * sysdb->index_size + sizeof(FAKE_HEADER) - 1);
+
+ p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1);
+
diff --git a/php82.spec b/php82.spec
index 1ca64e5..b8cae66 100644
--- a/php82.spec
+++ b/php82.spec
@@ -161,7 +161,7 @@ Patch10: php-8.2.0-curl.patch
# Use system nikic/php-parser
Patch41: php-8.2.0-parser.patch
# use system tzdata
-Patch42: php-8.1.0-systzdata-v22.patch
+Patch42: php-8.1.0-systzdata-v23.patch
# See http://bugs.php.net/53436
Patch43: php-7.4.0-phpize.patch
# Use -lldap_r for OpenLDAP
@@ -184,6 +184,8 @@ Patch91: php-7.2.0-oci8conf.patch
Patch300: php-7.4.0-datetests.patch
# WIP
+# https://github.com/php/php-src/pull/10756
+Patch400: 10756.patch
BuildRequires: gnupg2
BuildRequires: bzip2-devel
@@ -1199,6 +1201,9 @@ in pure PHP.
%endif
# WIP patch
+%if 0%{?rhel} == 7
+%patch400 -p1 -b .pr10756
+%endif
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE ZEND_LICENSE