update to 8.0.10RC1
adapt systzdata patch for timelib 2020.03 (v20)
This commit is contained in:
parent
ed96d1d716
commit
d85793a750
2
.gitignore
vendored
2
.gitignore
vendored
@ -26,3 +26,5 @@ php-7.*.xz.asc
|
||||
/php-8.0.9RC1.tar.xz.asc
|
||||
/php-8.0.9.tar.xz
|
||||
/php-8.0.9.tar.xz.asc
|
||||
/php-8.0.10RC1.tar.xz
|
||||
/php-8.0.10RC1.tar.xz.asc
|
||||
|
@ -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:
|
||||
r20: adapt for timelib 2020.03 (in 8.0.10RC1)
|
||||
r19: adapt for timelib 2020.02 (in 8.0.0beta2)
|
||||
r18: adapt for autotool change in 7.3.3RC1
|
||||
r17: adapt for timelib 2018.01 (in 7.3.2RC1)
|
||||
@ -30,9 +31,9 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
|
||||
r2: add filesystem trawl to set up name alias index
|
||||
r1: initial revision
|
||||
|
||||
diff -up php-8.0.0beta3/ext/date/config0.m4.systzdata php-8.0.0beta3/ext/date/config0.m4
|
||||
--- php-8.0.0beta3/ext/date/config0.m4.systzdata 2020-09-01 19:13:26.000000000 +0200
|
||||
+++ php-8.0.0beta3/ext/date/config0.m4 2020-09-02 08:07:51.039979873 +0200
|
||||
diff -up ./ext/date/config0.m4.systzdata ./ext/date/config0.m4
|
||||
--- ./ext/date/config0.m4.systzdata 2021-08-10 11:35:28.000000000 +0200
|
||||
+++ ./ext/date/config0.m4 2021-08-10 12:09:41.067003517 +0200
|
||||
@@ -4,6 +4,19 @@ AC_CHECK_HEADERS([io.h])
|
||||
dnl Check for strtoll, atoll
|
||||
AC_CHECK_FUNCS(strtoll atoll)
|
||||
@ -53,9 +54,9 @@ diff -up php-8.0.0beta3/ext/date/config0.m4.systzdata php-8.0.0beta3/ext/date/co
|
||||
PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
|
||||
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
|
||||
lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
|
||||
diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/date/lib/parse_tz.c
|
||||
--- php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata 2020-09-01 19:13:26.000000000 +0200
|
||||
+++ php-8.0.0beta3/ext/date/lib/parse_tz.c 2020-09-02 08:07:51.039979873 +0200
|
||||
diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
|
||||
--- ./ext/date/lib/parse_tz.c.systzdata 2021-08-10 11:35:28.000000000 +0200
|
||||
+++ ./ext/date/lib/parse_tz.c 2021-08-10 12:12:13.191605207 +0200
|
||||
@@ -26,8 +26,21 @@
|
||||
#include "timelib.h"
|
||||
#include "timelib_private.h"
|
||||
@ -90,7 +91,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
|
||||
/* read ID */
|
||||
version = (*tzf)[3] - '0';
|
||||
*tzf += 4;
|
||||
@@ -418,7 +436,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
|
||||
@@ -435,7 +453,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
|
||||
}
|
||||
}
|
||||
|
||||
@ -521,7 +522,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
|
||||
{
|
||||
int left = 0, right = tzdb->index_size - 1;
|
||||
|
||||
@@ -444,9 +884,48 @@ static int seek_to_tz_position(const uns
|
||||
@@ -461,9 +901,48 @@ static int seek_to_tz_position(const uns
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -570,7 +571,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
|
||||
}
|
||||
|
||||
const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
|
||||
@@ -458,7 +937,30 @@ const timelib_tzdb_index_entry *timelib_
|
||||
@@ -475,7 +954,30 @@ const timelib_tzdb_index_entry *timelib_
|
||||
int timelib_timezone_id_is_valid(const char *timezone, const timelib_tzdb *tzdb)
|
||||
{
|
||||
const unsigned char *tzf;
|
||||
@ -602,7 +603,7 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
|
||||
}
|
||||
|
||||
static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
|
||||
@@ -500,12 +1002,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
|
||||
@@ -517,6 +1019,8 @@ static timelib_tzinfo* timelib_tzinfo_ct
|
||||
timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code)
|
||||
{
|
||||
const unsigned char *tzf;
|
||||
@ -611,14 +612,16 @@ diff -up php-8.0.0beta3/ext/date/lib/parse_tz.c.systzdata php-8.0.0beta3/ext/dat
|
||||
timelib_tzinfo *tmp;
|
||||
int version;
|
||||
int transitions_result, types_result;
|
||||
unsigned int type; /* TIMELIB_TZINFO_PHP or TIMELIB_TZINFO_ZONEINFO */
|
||||
@@ -524,7 +1028,7 @@ timelib_tzinfo *timelib_parse_tzfile(con
|
||||
|
||||
*error_code = TIMELIB_ERROR_NO_ERROR;
|
||||
|
||||
- if (seek_to_tz_position(&tzf, timezone, tzdb)) {
|
||||
+ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
|
||||
tmp = timelib_tzinfo_ctor(timezone);
|
||||
|
||||
version = read_preamble(&tzf, tmp, &type);
|
||||
@@ -540,11 +1044,36 @@ timelib_tzinfo *timelib_parse_tzfile(con
|
||||
@@ -563,11 +1067,36 @@ timelib_tzinfo *timelib_parse_tzfile(con
|
||||
}
|
||||
skip_posix_string(&tzf, tmp);
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 112527d67798b6e18ed1c639e66d8cff674dcfd8 Mon Sep 17 00:00:00 2001
|
||||
From: Remi Collet <remi@php.net>
|
||||
Date: Tue, 3 Aug 2021 12:06:36 +0200
|
||||
Subject: [PATCH] Fix bug #81325 Segfault in zif_simplexml_import_dom
|
||||
|
||||
---
|
||||
ext/simplexml/simplexml.c | 2 +-
|
||||
ext/simplexml/tests/bug81325.phpt | 19 +++++++++++++++++++
|
||||
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||
create mode 100644 ext/simplexml/tests/bug81325.phpt
|
||||
|
||||
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
|
||||
index 4ed41d758762..21e1190e681b 100644
|
||||
--- a/ext/simplexml/simplexml.c
|
||||
+++ b/ext/simplexml/simplexml.c
|
||||
@@ -2635,7 +2635,7 @@ PHP_FUNCTION(simplexml_import_dom)
|
||||
nodep = xmlDocGetRootElement((xmlDocPtr) nodep);
|
||||
}
|
||||
|
||||
- if (nodep->type == XML_ELEMENT_NODE) {
|
||||
+ if (nodep && nodep->type == XML_ELEMENT_NODE) {
|
||||
if (!ce) {
|
||||
ce = sxe_class_entry;
|
||||
fptr_count = NULL;
|
||||
diff --git a/ext/simplexml/tests/bug81325.phpt b/ext/simplexml/tests/bug81325.phpt
|
||||
new file mode 100644
|
||||
index 000000000000..b4010dd1f0c3
|
||||
--- /dev/null
|
||||
+++ b/ext/simplexml/tests/bug81325.phpt
|
||||
@@ -0,0 +1,19 @@
|
||||
+--TEST--
|
||||
+BUg #81325 (segfault in zif_simplexml_import_dom)
|
||||
+--SKIPIF--
|
||||
+<?php
|
||||
+if (!extension_loaded('simplexml')) die('skip simplexml not available');
|
||||
+if (!extension_loaded('dom')) die('skip simplexml not available');
|
||||
+?>
|
||||
+--FILE--
|
||||
+<?php
|
||||
+$dom = new DOMDocument;
|
||||
+$dom->loadXML("foo");
|
||||
+$xml = simplexml_import_dom($dom);
|
||||
+?>
|
||||
+Done
|
||||
+--EXPECTF--
|
||||
+Warning: DOMDocument::loadXML(): Start tag expected%s
|
||||
+
|
||||
+Warning: simplexml_import_dom(): Invalid Nodetype%s
|
||||
+Done
|
14
php.spec
14
php.spec
@ -62,13 +62,13 @@
|
||||
%bcond_with imap
|
||||
%bcond_without lmdb
|
||||
|
||||
%global upver 8.0.9
|
||||
#global rcver RC1
|
||||
%global upver 8.0.10
|
||||
%global rcver RC1
|
||||
|
||||
Summary: PHP scripting language for creating dynamic web sites
|
||||
Name: php
|
||||
Version: %{upver}%{?rcver:~%{rcver}}
|
||||
Release: 2%{?dist}
|
||||
Release: 1%{?dist}
|
||||
# All files licensed under PHP version 3.01, except
|
||||
# Zend is licensed under Zend
|
||||
# TSRM is licensed under BSD
|
||||
@ -110,7 +110,7 @@ Patch9: php-8.0.6-deprecated.patch
|
||||
# Use system nikic/php-parser
|
||||
Patch41: php-8.0.0-parser.patch
|
||||
# use system tzdata
|
||||
Patch42: php-8.0.0-systzdata-v19.patch
|
||||
Patch42: php-8.0.10-systzdata-v20.patch
|
||||
# See http://bugs.php.net/53436
|
||||
Patch43: php-7.4.0-phpize.patch
|
||||
# Use -lldap_r for OpenLDAP
|
||||
@ -120,7 +120,6 @@ Patch45: php-7.4.0-ldap_r.patch
|
||||
Patch47: php-8.0.0-phpinfo.patch
|
||||
|
||||
# Upstream fixes (100+)
|
||||
Patch100: php-simplexml.patch
|
||||
|
||||
# Security fixes (200+)
|
||||
|
||||
@ -717,7 +716,6 @@ in pure PHP.
|
||||
%patch47 -p1 -b .phpinfo
|
||||
|
||||
# upstream patches
|
||||
%patch100 -p1 -b .segfault
|
||||
|
||||
# security patches
|
||||
|
||||
@ -1529,6 +1527,10 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 10 2021 Remi Collet <remi@remirepo.net> - 8.0.10~RC1-1
|
||||
- update to 8.0.10RC1
|
||||
- adapt systzdata patch for timelib 2020.03 (v20)
|
||||
|
||||
* Tue Aug 3 2021 Remi Collet <remi@remirepo.net> - 8.0.9-2
|
||||
- add upstream patch for https://bugs.php.net/81325 segfault in simplexml
|
||||
|
||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (php-8.0.9.tar.xz) = de9923bfa3ca37cd775ff743beb417152d7380fa5622f3fb0055b49e552c6484561f4f503bb11f535aadd12352c92f673f3e3cc86964c767b1f6cec21265d03c
|
||||
SHA512 (php-8.0.9.tar.xz.asc) = 54a555725193b94a10bef7c44ec20234b4cf9f01985325da079fccde481233e9e053d70bdb5f135b7d393d6fd98ea58abe9c19ffcfaeef4941fb7612cc701c17
|
||||
SHA512 (php-8.0.10RC1.tar.xz) = 83fa993c6f90d220e029e1edd8f6fad952cdc3ed6a9a8ab8d8c6aa688faf8398879e014c84ebc2620230c1574ce58792e7d407cfe031e510d71d91d37fcc36b3
|
||||
SHA512 (php-8.0.10RC1.tar.xz.asc) = fe3cf2dd695f5ef28ed4e48dd05d2574742cd02b3c92c9af7cb8fb17eb44c9f4249f2721dff27c68498e480a85241e93f488de6fd265ccdd0529feb8bbfd1e90
|
||||
|
Loading…
Reference in New Issue
Block a user