From 00a772bf9473ca3f76ba5423e4e72f87384f5e14 Mon Sep 17 00:00:00 2001 From: Eric Mann Date: Tue, 25 Feb 2025 09:20:39 -0800 Subject: [PATCH 01/65] PHP-8.3 is now for PHP 8.3.19-dev --- NEWS | 5 ++++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index e644f7c0358d4..86d23228c20a8 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.3.18 +?? ??? ????, PHP 8.3.19 + + +27 Feb 2025, PHP 8.3.18RC1 - BCMath: . Fixed bug GH-17398 (bcmul memory leak). (SakiTakamachi) diff --git a/Zend/zend.h b/Zend/zend.h index a3e833da7ef0b..e795ac967a23d 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.3.18-dev" +#define ZEND_VERSION "4.3.19-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index af4a1b3fc64dd..0e98613854281 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.3.18-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.3.19-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 32d4dae3d7b21..8b508aaa33585 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 3 -#define PHP_RELEASE_VERSION 18 +#define PHP_RELEASE_VERSION 19 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.3.18-dev" -#define PHP_VERSION_ID 80318 +#define PHP_VERSION "8.3.19-dev" +#define PHP_VERSION_ID 80319 From 8cbc0c57b7953a3b3c56d60fffdefd576186f9be Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 25 Feb 2025 05:08:12 +0000 Subject: [PATCH 02/65] Fix GH-17921 socket_read/socket_recv overflows on buffer size. update the existing checks to be more straightforward instead of counting on undefined behavior. close GH-17923 --- NEWS | 4 ++++ ext/sockets/sockets.c | 4 ++-- ext/sockets/tests/gh17921.phpt | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 ext/sockets/tests/gh17921.phpt diff --git a/NEWS b/NEWS index 86d23228c20a8..0294db412d20e 100644 --- a/NEWS +++ b/NEWS @@ -65,6 +65,10 @@ PHP NEWS . Fixed bug GH-15902 (Core dumped in ext/reflection/php_reflection.c). (DanielEScherzer) +- Sockets: + . Fixed bug GH-17921 (socket_read/socket_recv overflow on buffer size). + (David Carlier) + - Standard: . Fixed bug #72666 (stat cache clearing inconsistent between file:// paths and plain paths). (Jakub Zelenka) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index e6e231e2e5e7e..c252dc6e07a41 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -884,7 +884,7 @@ PHP_FUNCTION(socket_read) ENSURE_SOCKET_VALID(php_sock); /* overflow check */ - if ((length + 1) < 2) { + if (length <= 0 || length == ZEND_LONG_MAX) { RETURN_FALSE; } @@ -1326,7 +1326,7 @@ PHP_FUNCTION(socket_recv) ENSURE_SOCKET_VALID(php_sock); /* overflow check */ - if ((len + 1) < 2) { + if (len <= 0 || len == ZEND_LONG_MAX) { RETURN_FALSE; } diff --git a/ext/sockets/tests/gh17921.phpt b/ext/sockets/tests/gh17921.phpt new file mode 100644 index 0000000000000..d038ed04bc946 --- /dev/null +++ b/ext/sockets/tests/gh17921.phpt @@ -0,0 +1,18 @@ +--TEST-- +GH-16267 - overflow on socket_strerror argument +--EXTENSIONS-- +sockets +--FILE-- + +--EXPECT-- +bool(false) +bool(false) +bool(false) +bool(false) From 422e90db3bb0af0c1d397521328b252d6ce8a0b2 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 28 Feb 2025 09:20:02 +0100 Subject: [PATCH 03/65] Fix branch target in zend_jit_push_call_frame() (#17949) Introduced by accident in 3b4a58da44ed90adb11a98b88aea9114bbca14b1. Will request a cherry-pick. --- ext/opcache/jit/zend_jit_arm64.dasc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index 985c08f0512ea..bb6503c6f9dd3 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -8658,7 +8658,7 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con if (!func) { | ldrb TMP1w, [REG0, #offsetof(zend_closure, func.type)] | cmp TMP1w, #ZEND_USER_FUNCTION - | beq >1 + | bne >1 } if (!func || func->common.type == ZEND_USER_FUNCTION) { | add FCARG1x, REG0, #offsetof(zend_closure, func) From 6bb56fe0cf6e4b790ce427295e7210358d6a7ea7 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 28 Feb 2025 13:51:12 +0000 Subject: [PATCH 04/65] Change openssl_x509_verify test to use cert generator (#17882) This also prevents verifying cert with SHA1 signature --- ext/openssl/tests/CertificateGenerator.inc | 87 +++++++++++++--------- ext/openssl/tests/openssl_x509_verify.phpt | 21 +++++- 2 files changed, 70 insertions(+), 38 deletions(-) diff --git a/ext/openssl/tests/CertificateGenerator.inc b/ext/openssl/tests/CertificateGenerator.inc index 12764c8b63d2c..6fd73e0e9bed1 100644 --- a/ext/openssl/tests/CertificateGenerator.inc +++ b/ext/openssl/tests/CertificateGenerator.inc @@ -4,26 +4,33 @@ class CertificateGenerator { const CONFIG = __DIR__. DIRECTORY_SEPARATOR . 'openssl.cnf'; - /** @var OpenSSLCertificate */ - private $ca; + /** @var OpenSSLCertificate|false */ + private $ca = false; - /** @var resource */ - private $caKey; + /** @var OpenSSLAsymmetricKey|false */ + private $caKey = false; - /** @var resource|null */ + /** @var bool */ + private $useSelfSignedCert; + + /** @var OpenSSLCertificate|null */ private $lastCert; - /** @var resource|null */ + /** @var OpenSSLAsymmetricKey|null */ private $lastKey; - public function __construct() + public function __construct(bool $useSelfSignedCert = false) { if (!extension_loaded('openssl')) { throw new RuntimeException( 'openssl extension must be loaded to generate certificates' ); } - $this->generateCa(); + $this->useSelfSignedCert = $useSelfSignedCert; + + if (!$this->useSelfSignedCert) { + $this->generateCa(); + } } /** @@ -54,40 +61,32 @@ class CertificateGenerator 'commonName' => 'CA for PHP Tests' ]; - $this->ca = openssl_csr_sign( - openssl_csr_new( - $dn, - $this->caKey, - [ - 'x509_extensions' => 'v3_ca', - 'config' => self::CONFIG, - ] - ), - null, - $this->caKey, - 2, - [ - 'config' => self::CONFIG, - ] - ); + $csr = openssl_csr_new($dn, $this->caKey, ['config' => self::CONFIG]); + $this->ca = openssl_csr_sign($csr, null, $this->caKey, 365, ['config' => self::CONFIG]); } public function getCaCert() { + if ($this->useSelfSignedCert) { + throw new RuntimeException("CA is not generated in self-signed mode."); + } + $output = ''; openssl_x509_export($this->ca, $output); - return $output; } public function saveCaCert($file) { + if ($this->useSelfSignedCert) { + throw new RuntimeException("CA is not available in self-signed mode."); + } + openssl_x509_export_to_file($this->ca, $file); } - private function generateCertAndKey( - $commonNameForCert, $file, $keyLength = null, $subjectAltName = null - ) { + private function generateCertAndKey($commonNameForCert, $file, $keyLength = null, $subjectAltName = null) + { $dn = [ 'countryName' => 'BY', 'stateOrProvinceName' => 'Minsk', @@ -98,8 +97,7 @@ class CertificateGenerator $dn['commonName'] = $commonNameForCert; } - $subjectAltNameConfig = - $subjectAltName ? "subjectAltName = $subjectAltName" : ""; + $subjectAltNameConfig = $subjectAltName ? "subjectAltName = $subjectAltName" : ""; $configCode = <<lastKey = self::generateKey($keyLength); $csr = openssl_csr_new($dn, $this->lastKey, $config); + + // If in self-signed mode, sign with the same key, otherwise use CA + $signingCert = $this->useSelfSignedCert ? null : $this->ca; + $signingKey = $this->useSelfSignedCert ? $this->lastKey : $this->caKey; + $this->lastCert = openssl_csr_sign( $csr, - $this->ca, - $this->caKey, - /* days */ 2, - $config, + $signingCert, + $signingKey, + 365, // 1 year validity + $config ); return $config; @@ -166,6 +169,22 @@ CONFIG; unlink($config['config']); } + public function saveNewCertAndPubKey( + $commonNameForCert, $certFile, $pubKeyFile, $keyLength = null, $subjectAltName = null + ) { + $config = $this->generateCertAndKey($commonNameForCert, $certFile, $keyLength, $subjectAltName); + + openssl_x509_export_to_file($this->lastCert, $certFile); + + $keyDetails = openssl_pkey_get_details($this->lastKey); + if ($keyDetails === false || !isset($keyDetails['key'])) { + throw new RuntimeException("Failed to extract public key."); + } + + file_put_contents($pubKeyFile, $keyDetails['key']); + unlink($config['config']); + } + public function getCertDigest($algo) { return openssl_x509_fingerprint($this->lastCert, $algo); diff --git a/ext/openssl/tests/openssl_x509_verify.phpt b/ext/openssl/tests/openssl_x509_verify.phpt index 083d4669c4229..4b6e758857d27 100644 --- a/ext/openssl/tests/openssl_x509_verify.phpt +++ b/ext/openssl/tests/openssl_x509_verify.phpt @@ -4,16 +4,24 @@ openssl_x509_verify() tests openssl --FILE-- saveNewCertAndPubKey('openssl-x509-verify-server', $certFile, $keyFile); + +$fp = fopen($certFile,"r"); $a = fread($fp, 8192); fclose($fp); -$fp = fopen(__DIR__ . "/public.key","r"); +$fp = fopen($keyFile,"r"); $b = fread($fp, 8192); fclose($fp); -$cert = "file://" . __DIR__ . "/cert.crt"; -$key = "file://" . __DIR__ . "/public.key"; +$cert = "file://" . $certFile; +$key = "file://" . $keyFile; $wrongKey = "file://" . __DIR__ . "/public_rsa_2048.key"; var_dump(openssl_x509_verify($cert, $key)); @@ -23,6 +31,11 @@ var_dump(openssl_x509_verify("", "")); var_dump(openssl_x509_verify(openssl_x509_read($a), $b)); var_dump(openssl_x509_verify($cert, $wrongKey)); ?> +--CLEAN-- + --EXPECT-- int(1) int(-1) From ce8ab5f16a042801b7d1b86e56d71b659bf10d42 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 8 Feb 2025 12:44:58 +0100 Subject: [PATCH 05/65] Fix GH-17736: Assertion failure zend_reference_destroy() The cache slot for FETCH_OBJ_W in function `test` is primed with the class for C. The next call uses a simplexml instance and reuses the same cache slot. simplexml's get_property_ptr handler does not use the cache slot, so the old values remain in the cache slot. When `zend_handle_fetch_obj_flags` is called this is not guarded by a check for the class entry. So we end up using the prop_info from the property C::$a instead of the simplexml property. This patch adds a reset to the cache slots in the property address fetch code and also in the extensions with a non-standard reference handler. This keeps the run time cache consistent and avoids the issue without complicating the fast paths. Closes GH-17739. --- NEWS | 2 ++ Zend/zend_execute.c | 3 +++ ext/date/php_date.c | 1 + ext/dom/php_dom.c | 1 + ext/pdo/pdo_stmt.c | 1 + ext/simplexml/simplexml.c | 2 ++ ext/simplexml/tests/gh17736.phpt | 20 ++++++++++++++++++++ ext/snmp/snmp.c | 1 + ext/spl/spl_array.c | 2 ++ ext/xmlreader/php_xmlreader.c | 2 ++ ext/zip/php_zip.c | 2 ++ 11 files changed, 37 insertions(+) create mode 100644 ext/simplexml/tests/gh17736.phpt diff --git a/NEWS b/NEWS index 0294db412d20e..352dce95e7a42 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.19 +- Treewide: + . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos) 27 Feb 2025, PHP 8.3.18RC1 diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index dc28578f2c1a3..99da3a4a051f3 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3232,6 +3232,9 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c return; } } + } else if (prop_op_type == IS_CONST) { + /* CE mismatch, make cache slot consistent */ + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; } /* Pointer on property callback is required */ diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 436af32f93536..6f7796eec1250 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4399,6 +4399,7 @@ static zval *date_interval_get_property_ptr_ptr(zend_object *object, zend_string zend_string_equals_literal(name, "days") || zend_string_equals_literal(name, "invert") ) { /* Fallback to read_property. */ + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; ret = NULL; } else { ret = zend_std_get_property_ptr_ptr(object, name, type, cache_slot); diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 7ec107dd712e3..1da53bae64b51 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -303,6 +303,7 @@ static zval *dom_get_property_ptr_ptr(zend_object *object, zend_string *name, in return zend_std_get_property_ptr_ptr(object, name, type, cache_slot); } + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; return NULL; } diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 3998b64ab7e13..6aec99026232b 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2495,6 +2495,7 @@ static zval *pdo_row_get_property_ptr_ptr(zend_object *object, zend_string *name ZEND_IGNORE_VALUE(type); ZEND_IGNORE_VALUE(cache_slot); + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; return NULL; } diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 18bfa31271e19..46ec3a2a788ab 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -635,6 +635,8 @@ static zval *sxe_property_get_adr(zend_object *object, zend_string *zname, int f SXE_ITER type; zval member; + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); if (UNEXPECTED(!node)) { diff --git a/ext/simplexml/tests/gh17736.phpt b/ext/simplexml/tests/gh17736.phpt new file mode 100644 index 0000000000000..78561f6ab0293 --- /dev/null +++ b/ext/simplexml/tests/gh17736.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-17736 (Assertion failure zend_reference_destroy()) +--EXTENSIONS-- +simplexml +--FILE-- +'); +class C { + public int $a = 1; +} +function test($obj) { + $ref =& $obj->a; +} +$obj = new C; +test($obj); +test($o1); +echo "Done\n"; +?> +--EXPECT-- +Done diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index b5bb9f91745c6..02348a5fbca00 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -1861,6 +1861,7 @@ static zval *php_snmp_get_property_ptr_ptr(zend_object *object, zend_string *nam return zend_std_get_property_ptr_ptr(object, name, type, cache_slot); } + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; return NULL; } diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 10407bee6a1a8..bd03a8aae0189 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -844,6 +844,8 @@ static zval *spl_array_get_property_ptr_ptr(zend_object *object, zend_string *na if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 && !zend_std_has_property(object, name, ZEND_PROPERTY_EXISTS, NULL)) { + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; + /* If object has offsetGet() overridden, then fallback to read_property, * which will call offsetGet(). */ zval member; diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index ba540692804ef..569058e91a454 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -121,6 +121,8 @@ zval *xmlreader_get_property_ptr_ptr(zend_object *object, zend_string *name, int zval *retval = NULL; xmlreader_prop_handler *hnd = NULL; + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; + obj = php_xmlreader_fetch_object(object); if (obj->prop_handler != NULL) { diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 54bdffbecb03b..e28cf688dcff8 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -890,6 +890,8 @@ static zval *php_zip_get_property_ptr_ptr(zend_object *object, zend_string *name zval *retval = NULL; zip_prop_handler *hnd = NULL; + cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL; + obj = php_zip_fetch_object(object); if (obj->prop_handler != NULL) { From 504056888c3b80404d2028364b44b1b301a843ed Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 3 Mar 2025 08:20:48 +0100 Subject: [PATCH 06/65] Fix GH-17938: UAF with zend_test opline observer and magic_quotes_gpc=1 (#17958) --- ext/zend_test/test.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index b2e2756381fdc..a7dd604d89ef3 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -666,6 +666,15 @@ void * zend_test_custom_realloc(void * ptr, size_t len) return _zend_mm_realloc(ZT_G(zend_orig_heap), ptr, len ZEND_FILE_LINE_EMPTY_CC ZEND_FILE_LINE_EMPTY_CC); } +static void zend_test_reset_heap(zend_zend_test_globals *zend_test_globals) +{ + if (zend_test_globals->zend_test_heap) { + free(zend_test_globals->zend_test_heap); + zend_test_globals->zend_test_heap = NULL; + zend_mm_set_heap(zend_test_globals->zend_orig_heap); + } +} + static PHP_INI_MH(OnUpdateZendTestObserveOplineInZendMM) { if (new_value == NULL) { @@ -687,10 +696,8 @@ static PHP_INI_MH(OnUpdateZendTestObserveOplineInZendMM) ); ZT_G(zend_orig_heap) = zend_mm_get_heap(); zend_mm_set_heap(ZT_G(zend_test_heap)); - } else if (ZT_G(zend_test_heap)) { - free(ZT_G(zend_test_heap)); - ZT_G(zend_test_heap) = NULL; - zend_mm_set_heap(ZT_G(zend_orig_heap)); + } else { + zend_test_reset_heap(ZEND_MODULE_GLOBALS_BULK(zend_test)); } return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); } @@ -1339,6 +1346,7 @@ static PHP_GINIT_FUNCTION(zend_test) static PHP_GSHUTDOWN_FUNCTION(zend_test) { zend_test_observer_gshutdown(zend_test_globals); + zend_test_reset_heap(zend_test_globals); } PHP_MINFO_FUNCTION(zend_test) From 4694c3e9977e53799870c998991e205056dba4f8 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Mon, 3 Mar 2025 10:04:02 -0400 Subject: [PATCH 07/65] Attempt at ppc64 CI (#17945) This assumes gentoo (which has best ppc64be support of mainstream distributions). (Rebased onto the new workflow_call approach) --- .github/actions/configure-gentoo/action.yml | 81 +++++++++++++++++++++ .github/actions/test-gentoo/action.yml | 34 +++++++++ .github/workflows/nightly.yml | 46 ++++++++++++ .github/workflows/root.yml | 1 + 4 files changed, 162 insertions(+) create mode 100644 .github/actions/configure-gentoo/action.yml create mode 100644 .github/actions/test-gentoo/action.yml diff --git a/.github/actions/configure-gentoo/action.yml b/.github/actions/configure-gentoo/action.yml new file mode 100644 index 0000000000000..e1ae914681fb0 --- /dev/null +++ b/.github/actions/configure-gentoo/action.yml @@ -0,0 +1,81 @@ +name: ./configure +inputs: + configurationParameters: + default: '' + required: false + skipSlow: + default: false + required: false +runs: + using: composite + steps: + - shell: bash + run: | + set -x + ./buildconf --force + ./configure \ + --enable-option-checking=fatal \ + --prefix=/usr \ + --with-libdir=lib64 \ + --enable-phpdbg \ + --enable-fpm \ + --with-pdo-mysql=mysqlnd \ + --with-mysqli=mysqlnd \ + ${{ inputs.skipSlow == 'false' && '--with-pgsql' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-pgsql' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-sqlite' || '' }} \ + --enable-intl \ + --without-pear \ + --enable-gd \ + --with-jpeg \ + --with-webp \ + --with-freetype \ + --with-xpm \ + --enable-exif \ + --with-zip \ + --with-zlib \ + --enable-soap \ + --enable-xmlreader \ + --with-xsl \ + ${{ inputs.skipSlow == 'false' && '--with-tidy' || '' }} \ + --enable-sysvsem \ + --enable-sysvshm \ + --enable-shmop \ + --enable-pcntl \ + --with-readline \ + --enable-mbstring \ + --with-iconv \ + --with-curl \ + --with-gettext \ + --enable-sockets \ + --with-bz2 \ + --with-openssl \ + --with-gmp \ + --enable-bcmath \ + --enable-calendar \ + --enable-ftp \ + ${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \ + --enable-sysvmsg \ + --with-ffi \ + --enable-zend-test \ + ${{ inputs.skipSlow == 'false' && '--enable-dl-test=shared' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-ldap' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-ldap-sasl' || '' }} \ + --with-password-argon2 \ + --with-mhash \ + --with-sodium \ + --enable-dba \ + --with-cdb \ + --enable-flatfile \ + --enable-inifile \ + --with-tcadb \ + --with-lmdb \ + --with-qdbm \ + ${{ inputs.skipSlow == 'false' && '--with-snmp' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-unixODBC' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-odbc=unixODBC,/usr' || '' }} \ + --with-config-file-path=/etc \ + --with-config-file-scan-dir=/etc/php.d \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \ + --enable-werror \ + ${{ inputs.configurationParameters }} || cat config.log diff --git a/.github/actions/test-gentoo/action.yml b/.github/actions/test-gentoo/action.yml new file mode 100644 index 0000000000000..ec9fb0b70c6a3 --- /dev/null +++ b/.github/actions/test-gentoo/action.yml @@ -0,0 +1,34 @@ +name: Test +inputs: + runTestsParameters: + default: '' + required: false +runs: + using: composite + steps: + - shell: bash + run: | + set -x + # XXX: Set up other database tests? + # XXX: These tests are not running containerized + export MYSQL_TEST_USER=ci + export MYSQL_TEST_PASSWD=ci + if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then + export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test" + fi + export PDO_MYSQL_TEST_USER=ci + export PDO_MYSQL_TEST_PASS=ci + export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=ci password=ci" + if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then + export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=ci password=ci" + fi + # Slow tests criteron is doubled because this runner isn't as fast as others + export SKIP_IO_CAPTURE_TESTS=1 + export STACK_LIMIT_DEFAULTS_CHECK=1 + sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ + -j$(nproc) \ + -g FAIL,BORK,LEAK,XLEAK \ + --no-progress \ + --show-diff \ + --show-slow 2000 \ + --set-timeout 120 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 2377286ca830c..7993c1b6e3586 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -17,6 +17,9 @@ on: run_alpine: required: true type: boolean + run_linux_ppc64: + required: true + type: boolean run_macos_arm64: required: true type: boolean @@ -35,6 +38,49 @@ on: permissions: contents: read jobs: + LINUX_PPC64: + if: inputs.run_linux_ppc64 + name: LINUX_PPC64_ASAN_UBSAN_DEBUG_ZTS + # This runs on a self-hosted runner; see https://wiki.php.net/systems/ci + runs-on: [self-hosted, gentoo, ppc64] + steps: + - name: git checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} + - name: System info + run: | + echo "::group::Show host CPU info" + lscpu + echo "::endgroup::" + echo "::group::Show installed packages" + cat /var/lib/portage/world + echo "::endgroup::" + - name: ./configure + uses: ./.github/actions/configure-gentoo + with: + configurationParameters: >- + CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC" + LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function" + CC=clang-17 + CXX=clang++-17 + --enable-debug + --enable-zts + skipSlow: false # FIXME: This should likely include slow extensions + - name: make + run: make -j$(/usr/bin/nproc) >/dev/null + # Skip an install action for now + - name: Tests + uses: ./.github/actions/test-gentoo + # There is no PPC JIT, so rip this out + with: + runTestsParameters: >- + --asan -x + - name: Notify Slack + if: failure() + uses: ./.github/actions/notify-slack + with: + token: ${{ secrets.ACTION_MONITORING_SLACK }} ALPINE: if: inputs.run_alpine name: ALPINE_X64_ASAN_UBSAN_DEBUG_ZTS diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml index 5cdd70489343f..25b7a6baadef7 100644 --- a/.github/workflows/root.yml +++ b/.github/workflows/root.yml @@ -53,6 +53,7 @@ jobs: community_verify_type_inference: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }} libmysqlclient_with_mysqli: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1) }} run_alpine: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }} + run_linux_ppc64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }} run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }} ubuntu_version: ${{ (((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04') From 294888053ae9ead284cace41a9b2783967c69bfa Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 3 Mar 2025 22:15:23 +0100 Subject: [PATCH 08/65] Upgrade i386 branch to Ubuntu 22.04 --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4dad4feea846b..82b67dcd5bcc6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -139,7 +139,7 @@ jobs: name: LINUX_X32_DEBUG_ZTS runs-on: ubuntu-latest container: - image: ubuntu:20.04 + image: ubuntu:22.04 env: MYSQL_TEST_HOST: mysql PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test From dc6586dd9d4bfa94cd6424a81a91c4f1f183f611 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Wed, 5 Mar 2025 10:17:39 -0400 Subject: [PATCH 09/65] Skip mysqli/tests/bug73462 on PPC CI (#17971) * Skip this test on PPC CI Seems to be unfortunately flaky with persistent connections. * use spaces in phpt file --- ext/mysqli/tests/bug73462.phpt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/mysqli/tests/bug73462.phpt b/ext/mysqli/tests/bug73462.phpt index a5ae94acffa80..c4d68ca4f5935 100644 --- a/ext/mysqli/tests/bug73462.phpt +++ b/ext/mysqli/tests/bug73462.phpt @@ -5,6 +5,13 @@ mysqli --SKIPIF-- --FILE-- Date: Thu, 6 Mar 2025 15:01:30 +0100 Subject: [PATCH 10/65] Fix flaky DatePeriod test $start and $end use the H:i:s from the current time. If $end happens on a second boundary, $start + 4 days will include $end, thus performing an extra iteration. Fix this by setting H:i:s to 00:00:00. --- ext/date/tests/DatePeriod_no_advance_on_valid.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/date/tests/DatePeriod_no_advance_on_valid.phpt b/ext/date/tests/DatePeriod_no_advance_on_valid.phpt index 6a8a9d0f5d04a..936861ca172c1 100644 --- a/ext/date/tests/DatePeriod_no_advance_on_valid.phpt +++ b/ext/date/tests/DatePeriod_no_advance_on_valid.phpt @@ -3,8 +3,8 @@ Date Period iterators do not advance on valid() --FILE-- getIterator(); From 5fcc8d4cd19552b5ea7c154a0040832b10e4fab6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 6 Mar 2025 15:24:15 +0100 Subject: [PATCH 11/65] Upgrade security branches to Ubuntu 22.04 20.04 goes out of security support in 2 months. Backporting various commits. See d98963a0713662c567091cdb09a7c9d97a067ce4 See af721c9c361643df13a8137d22de9acde82512e5 See 378b79b90c64997b6fded3381bc5fc8443115b64 Closes GH-17963 --- .github/actions/setup-mssql/action.yml | 2 +- .github/actions/setup-x64/action.yml | 2 +- .github/scripts/setup-slapd.sh | 6 ++++-- .github/workflows/push.yml | 2 +- .github/workflows/root.yml | 5 ++--- Zend/zend_portability.h | 24 ++++++++++++++++++++++++ ext/imap/php_imap.c | 16 +++++++++++++--- ext/imap/php_imap.h | 2 ++ ext/oci8/php_oci8_int.h | 2 ++ ext/opcache/jit/dynasm/dasm_x86.h | 7 +++++++ ext/pdo/pdo_dbh.c | 2 +- ext/pdo_oci/php_pdo_oci_int.h | 9 +++++++++ ext/soap/php_encoding.c | 9 ++++++++- 13 files changed, 75 insertions(+), 13 deletions(-) diff --git a/.github/actions/setup-mssql/action.yml b/.github/actions/setup-mssql/action.yml index c069744a21b59..dd372a5637aac 100644 --- a/.github/actions/setup-mssql/action.yml +++ b/.github/actions/setup-mssql/action.yml @@ -11,4 +11,4 @@ runs: -p 1433:1433 \ --name sql1 \ -h sql1 \ - -d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04 + -d mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 diff --git a/.github/actions/setup-x64/action.yml b/.github/actions/setup-x64/action.yml index d03a51f455b35..9d49107fb3ca6 100644 --- a/.github/actions/setup-x64/action.yml +++ b/.github/actions/setup-x64/action.yml @@ -7,7 +7,7 @@ runs: set -x sudo service slapd start - docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;" + docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;" sudo locale-gen de_DE ./.github/scripts/setup-slapd.sh diff --git a/.github/scripts/setup-slapd.sh b/.github/scripts/setup-slapd.sh index ec0b2d3060445..fcaa67d0a5f7d 100755 --- a/.github/scripts/setup-slapd.sh +++ b/.github/scripts/setup-slapd.sh @@ -1,5 +1,5 @@ #!/bin/sh -set -ex +set -e # Create TLS certificate sudo mkdir -p /etc/ldap/ssl @@ -42,7 +42,9 @@ sudo sed -e 's|^\s*SLAPD_SERVICES\s*=.*$|SLAPD_SERVICES="ldap:/// ldaps:/// ldap # Configure LDAP database. DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootDN=*)(olcSuffix=*))' dn | grep -i '^dn:' | sed -e 's/^dn:\s*//'`; -sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif +if test -f "/etc/ldap/schema/ppolicy.ldif"; then + sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif +fi sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF dn: $DBDN diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5264a3d290fac..ddc90935018ba 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -68,7 +68,7 @@ jobs: - debug: false zts: true name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: git checkout uses: actions/checkout@v4 diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml index 25b7a6baadef7..2bb895e96b668 100644 --- a/.github/workflows/root.yml +++ b/.github/workflows/root.yml @@ -48,7 +48,7 @@ jobs: with: asan_ubuntu_version: ${{ (((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04') - || '20.04' }} + || '22.04' }} branch: ${{ matrix.branch.ref }} community_verify_type_inference: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }} libmysqlclient_with_mysqli: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1) }} @@ -57,8 +57,7 @@ jobs: run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }} ubuntu_version: ${{ (((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04') - || ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) && '22.04') - || '20.04' }} + || '22.04' }} windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }} skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }} skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }} diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 8f545ecba807c..120b166f7ce8a 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -685,4 +685,28 @@ extern "C++" { # define ZEND_INDIRECT_RETURN #endif +#define __ZEND_DO_PRAGMA(x) _Pragma(#x) +#define _ZEND_DO_PRAGMA(x) __ZEND_DO_PRAGMA(x) +#if defined(__clang__) +# define ZEND_DIAGNOSTIC_IGNORED_START(warning) \ + _Pragma("clang diagnostic push") \ + _ZEND_DO_PRAGMA(clang diagnostic ignored warning) +# define ZEND_DIAGNOSTIC_IGNORED_END \ + _Pragma("clang diagnostic pop") +#elif defined(__GNUC__) +# define ZEND_DIAGNOSTIC_IGNORED_START(warning) \ + _Pragma("GCC diagnostic push") \ + _ZEND_DO_PRAGMA(GCC diagnostic ignored warning) +# define ZEND_DIAGNOSTIC_IGNORED_END \ + _Pragma("GCC diagnostic pop") +#else +# define ZEND_DIAGNOSTIC_IGNORED_START(warning) +# define ZEND_DIAGNOSTIC_IGNORED_END +#endif + +/** @deprecated */ +#define ZEND_CGG_DIAGNOSTIC_IGNORED_START ZEND_DIAGNOSTIC_IGNORED_START +/** @deprecated */ +#define ZEND_CGG_DIAGNOSTIC_IGNORED_END ZEND_DIAGNOSTIC_IGNORED_END + #endif /* ZEND_PORTABILITY_H */ diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 59244b664d7df..5c45e213aa582 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -695,11 +695,9 @@ PHP_RINIT_FUNCTION(imap) } /* }}} */ -/* {{{ PHP_RSHUTDOWN_FUNCTION */ -PHP_RSHUTDOWN_FUNCTION(imap) +static void free_errorlist(void) { ERRORLIST *ecur = NIL; - STRINGLIST *acur = NIL; if (IMAPG(imap_errorstack) != NIL) { /* output any remaining errors at their original error level */ @@ -715,6 +713,11 @@ PHP_RSHUTDOWN_FUNCTION(imap) mail_free_errorlist(&IMAPG(imap_errorstack)); IMAPG(imap_errorstack) = NIL; } +} + +static void free_stringlist(void) +{ + STRINGLIST *acur = NIL; if (IMAPG(imap_alertstack) != NIL) { /* output any remaining alerts at E_NOTICE level */ @@ -730,6 +733,13 @@ PHP_RSHUTDOWN_FUNCTION(imap) mail_free_stringlist(&IMAPG(imap_alertstack)); IMAPG(imap_alertstack) = NIL; } +} + +/* {{{ PHP_RSHUTDOWN_FUNCTION */ +PHP_RSHUTDOWN_FUNCTION(imap) +{ + free_errorlist(); + free_stringlist(); return SUCCESS; } /* }}} */ diff --git a/ext/imap/php_imap.h b/ext/imap/php_imap.h index ce32d3cda8d91..24019521d61bb 100644 --- a/ext/imap/php_imap.h +++ b/ext/imap/php_imap.h @@ -47,7 +47,9 @@ # endif /* these are used for quota support */ + ZEND_DIAGNOSTIC_IGNORED_START("-Wstrict-prototypes") # include "c-client.h" /* includes mail.h and rfc822.h */ + ZEND_DIAGNOSTIC_IGNORED_END # include "imap4r1.h" /* location of c-client quota functions */ #else # include "mail.h" diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h index 171edfa53d24c..0851f74f3f418 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -53,7 +53,9 @@ /* }}} */ #include "ext/standard/php_string.h" +ZEND_DIAGNOSTIC_IGNORED_START("-Wstrict-prototypes") #include +ZEND_DIAGNOSTIC_IGNORED_END extern int le_connection; extern int le_pconnection; diff --git a/ext/opcache/jit/dynasm/dasm_x86.h b/ext/opcache/jit/dynasm/dasm_x86.h index 618925c2d2572..098b226b06a11 100644 --- a/ext/opcache/jit/dynasm/dasm_x86.h +++ b/ext/opcache/jit/dynasm/dasm_x86.h @@ -124,7 +124,14 @@ void dasm_free(Dst_DECL) void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl) { dasm_State *D = Dst_REF; +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Warray-bounds" +#endif D->globals = gl - 10; /* Negative bias to compensate for locals. */ +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int)); } diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 9544a7215bbf7..d15bb3ac233f5 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -81,7 +81,7 @@ void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *sqlstate pdo_err = &stmt->error_code; } - strncpy(*pdo_err, sqlstate, 6); + memcpy(*pdo_err, sqlstate, sizeof(pdo_error_type)); /* hash sqlstate to error messages */ msg = pdo_sqlstate_state_to_description(*pdo_err); diff --git a/ext/pdo_oci/php_pdo_oci_int.h b/ext/pdo_oci/php_pdo_oci_int.h index dbffb22d092f8..dd513ff94e061 100644 --- a/ext/pdo_oci/php_pdo_oci_int.h +++ b/ext/pdo_oci/php_pdo_oci_int.h @@ -14,7 +14,14 @@ +----------------------------------------------------------------------+ */ +#ifndef PHP_PDO_OCI_INT_H +#define PHP_PDO_OCI_INT_H + +#include "zend_portability.h" + +ZEND_DIAGNOSTIC_IGNORED_START("-Wstrict-prototypes") #include +ZEND_DIAGNOSTIC_IGNORED_END typedef struct { const char *file; @@ -105,3 +112,5 @@ enum { PDO_OCI_ATTR_MODULE, PDO_OCI_ATTR_CALL_TIMEOUT }; + +#endif /* PHP_PDO_OCI_INT_H */ diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 20f60f48d6a2b..4d389a8c58579 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -2388,7 +2388,14 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod if (style == SOAP_ENCODED) { if (soap_version == SOAP_1_1) { smart_str_0(&array_type); - if (strcmp(ZSTR_VAL(array_type.s),"xsd:anyType") == 0) { +#if defined(__GNUC__) && __GNUC__ >= 11 + ZEND_DIAGNOSTIC_IGNORED_START("-Wstringop-overread") +#endif + bool is_xsd_any_type = strcmp(ZSTR_VAL(array_type.s),"xsd:anyType") == 0; +#if defined(__GNUC__) && __GNUC__ >= 11 + ZEND_DIAGNOSTIC_IGNORED_END +#endif + if (is_xsd_any_type) { smart_str_free(&array_type); smart_str_appendl(&array_type,"xsd:ur-type",sizeof("xsd:ur-type")-1); } From 5e8aff2c5fdd4c278446f85b267aab680a9fdca3 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Fri, 7 Mar 2025 10:39:14 -0400 Subject: [PATCH 12/65] Remove "Notify Slack" on ppc nightly workflow (#17993) We get weird failures at here, and Ilija was talking about possibly removing it in general. --- .github/workflows/nightly.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7993c1b6e3586..c9e6850604312 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -76,11 +76,6 @@ jobs: with: runTestsParameters: >- --asan -x - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} ALPINE: if: inputs.run_alpine name: ALPINE_X64_ASAN_UBSAN_DEBUG_ZTS From 07ceadf7d9bcb398fd3b3befa9fdf0df3a96dc8d Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 6 Mar 2025 22:26:34 +0000 Subject: [PATCH 13/65] Fix GH-17984: gd calls with array arguments. close GH-17985 --- NEWS | 2 ++ ext/gd/gd.c | 8 +++---- ext/gd/tests/gh17984.phpt | 44 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 ext/gd/tests/gh17984.phpt diff --git a/NEWS b/NEWS index 352dce95e7a42..d72d262bbc42c 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,8 @@ PHP NEWS - GD: . Fixed bug GH-17772 (imagepalettetotruecolor crash with memory_limit=2M). (David Carlier) + . Fixed bug GH-17984 (calls with arguments as array with references). + (David Carlier) - LDAP: . Fixed bug GH-17704 (ldap_search fails when $attributes contains a diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 847e0835bad4f..2585923edcc22 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3417,7 +3417,7 @@ PHP_FUNCTION(imageconvolution) } for (i=0; i<3; i++) { - if ((var = zend_hash_index_find(Z_ARRVAL_P(hash_matrix), (i))) != NULL && Z_TYPE_P(var) == IS_ARRAY) { + if ((var = zend_hash_index_find_deref(Z_ARRVAL_P(hash_matrix), (i))) != NULL && Z_TYPE_P(var) == IS_ARRAY) { if (zend_hash_num_elements(Z_ARRVAL_P(var)) != 3 ) { zend_argument_value_error(2, "must be a 3x3 array, matrix[%d] only has %d elements", i, zend_hash_num_elements(Z_ARRVAL_P(var))); RETURN_THROWS(); @@ -3697,7 +3697,7 @@ PHP_FUNCTION(imageaffine) } for (i = 0; i < nelems; i++) { - if ((zval_affine_elem = zend_hash_index_find(Z_ARRVAL_P(z_affine), i)) != NULL) { + if ((zval_affine_elem = zend_hash_index_find_deref(Z_ARRVAL_P(z_affine), i)) != NULL) { switch (Z_TYPE_P(zval_affine_elem)) { case IS_LONG: affine[i] = Z_LVAL_P(zval_affine_elem); @@ -3873,7 +3873,7 @@ PHP_FUNCTION(imageaffinematrixconcat) } for (i = 0; i < 6; i++) { - if ((tmp = zend_hash_index_find(Z_ARRVAL_P(z_m1), i)) != NULL) { + if ((tmp = zend_hash_index_find_deref(Z_ARRVAL_P(z_m1), i)) != NULL) { switch (Z_TYPE_P(tmp)) { case IS_LONG: m1[i] = Z_LVAL_P(tmp); @@ -3890,7 +3890,7 @@ PHP_FUNCTION(imageaffinematrixconcat) } } - if ((tmp = zend_hash_index_find(Z_ARRVAL_P(z_m2), i)) != NULL) { + if ((tmp = zend_hash_index_find_deref(Z_ARRVAL_P(z_m2), i)) != NULL) { switch (Z_TYPE_P(tmp)) { case IS_LONG: m2[i] = Z_LVAL_P(tmp); diff --git a/ext/gd/tests/gh17984.phpt b/ext/gd/tests/gh17984.phpt new file mode 100644 index 0000000000000..c46c455799e0f --- /dev/null +++ b/ext/gd/tests/gh17984.phpt @@ -0,0 +1,44 @@ +--TEST-- +GH-17984: array of references handling +--EXTENSIONS-- +gd +--FILE-- + +--EXPECT-- +object(GdImage)#2 (0) { +} +array(6) { + [0]=> + float(2028) + [1]=> + float(46) + [2]=> + float(138) + [3]=> + float(4) + [4]=> + float(233) + [5]=> + float(7) +} +bool(true) +bool(true) +bool(true) From fc09eb21db722cc31cea0a8687c9bfdb05bb1218 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 7 Mar 2025 18:31:00 +0000 Subject: [PATCH 14/65] [skip ci] fix NEWS entry --- NEWS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index d72d262bbc42c..46b0934b8700e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.19 +- GD: + . Fixed bug GH-17984 (calls with arguments as array with references). + (David Carlier) + - Treewide: . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos) @@ -34,8 +38,6 @@ PHP NEWS - GD: . Fixed bug GH-17772 (imagepalettetotruecolor crash with memory_limit=2M). (David Carlier) - . Fixed bug GH-17984 (calls with arguments as array with references). - (David Carlier) - LDAP: . Fixed bug GH-17704 (ldap_search fails when $attributes contains a From 2634622d3dd0a4d41426465712d271be0e115a75 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 8 Mar 2025 11:12:24 +0100 Subject: [PATCH 15/65] Fix uninitialized memory accesses in DOM iterator --- ext/dom/dom_iterators.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index adc5835f9d8bd..ff63342595ae9 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -278,15 +278,13 @@ zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, i zend_throw_error(NULL, "An iterator cannot be used with foreach by reference"); return NULL; } - iterator = emalloc(sizeof(php_dom_iterator)); + iterator = emalloc(sizeof(*iterator)); + memset(iterator, 0, sizeof(*iterator)); zend_iterator_init(&iterator->intern); - iterator->cache_tag.modification_nr = 0; ZVAL_OBJ_COPY(&iterator->intern.data, Z_OBJ_P(object)); iterator->intern.funcs = &php_dom_iterator_funcs; - ZVAL_UNDEF(&iterator->curobj); - intern = Z_DOMOBJ_P(object); objmap = (dom_nnodemap_object *)intern->ptr; if (objmap != NULL) { From b0858427aaccdae0db6764c0e86ae9489a92032e Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 24 Mar 2023 10:13:25 +0100 Subject: [PATCH 16/65] Suppress snmp lib memory leak, skip ASAN tests I don't know enough about this library to fix those :( Cherry-picked from: be4db6b5505fb32489a5bf2723ea85b7af8d4fac ba1d9d0ab2cfae4c438513b7016c40b843868ac0 --- .github/lsan-suppressions.txt | 1 + ext/snmp/tests/snmp-object-errno-errstr.phpt | 1 + ext/snmp/tests/snmp-object-error.phpt | 1 + ext/snmp/tests/snmp2_get.phpt | 1 + ext/snmp/tests/snmp2_set-nomib.phpt | 1 + ext/snmp/tests/snmp2_walk.phpt | 1 + ext/snmp/tests/snmp3-error.phpt | 1 + ext/snmp/tests/snmp_getvalue.phpt | 1 + ext/snmp/tests/snmpget.phpt | 1 + ext/snmp/tests/snmpset-nomib.phpt | 1 + ext/snmp/tests/snmpwalk.phpt | 1 + 11 files changed, 11 insertions(+) diff --git a/.github/lsan-suppressions.txt b/.github/lsan-suppressions.txt index 5c2ee76e4607a..f547205d985b9 100644 --- a/.github/lsan-suppressions.txt +++ b/.github/lsan-suppressions.txt @@ -1 +1,2 @@ leak:acommon::DictInfoList::elements +leak:netsnmp_init_mib_internals diff --git a/ext/snmp/tests/snmp-object-errno-errstr.phpt b/ext/snmp/tests/snmp-object-errno-errstr.phpt index 831a9f3319dbb..783191c2c00d8 100644 --- a/ext/snmp/tests/snmp-object-errno-errstr.phpt +++ b/ext/snmp/tests/snmp-object-errno-errstr.phpt @@ -7,6 +7,7 @@ snmp --SKIPIF-- --FILE-- --FILE-- --FILE-- --ENV-- MIBS= diff --git a/ext/snmp/tests/snmp2_walk.phpt b/ext/snmp/tests/snmp2_walk.phpt index 4cd9b3a85b6fd..fcf14424ca057 100644 --- a/ext/snmp/tests/snmp2_walk.phpt +++ b/ext/snmp/tests/snmp2_walk.phpt @@ -7,6 +7,7 @@ snmp --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --ENV-- MIBS= diff --git a/ext/snmp/tests/snmpwalk.phpt b/ext/snmp/tests/snmpwalk.phpt index b0e8a8a8afd18..61ef33a70a292 100644 --- a/ext/snmp/tests/snmpwalk.phpt +++ b/ext/snmp/tests/snmpwalk.phpt @@ -7,6 +7,7 @@ snmp --SKIPIF-- --FILE-- Date: Fri, 7 Mar 2025 17:56:17 +0100 Subject: [PATCH 17/65] Fix GH-17989: mb_output_handler crash with unset http_output_conv_mimetypes The INI option can be NULL or invalid, resulting in a NULL global. So we have to add a NULL check. Closes GH-17996. --- NEWS | 4 ++++ ext/mbstring/mbstring.c | 4 +++- ext/mbstring/tests/gh17989.phpt | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ext/mbstring/tests/gh17989.phpt diff --git a/NEWS b/NEWS index 46b0934b8700e..02b02bb84bdc0 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ PHP NEWS . Fixed bug GH-17984 (calls with arguments as array with references). (David Carlier) +- Mbstring: + . Fixed bug GH-17989 (mb_output_handler crash with unset + http_output_conv_mimetypes). (nielsdos) + - Treewide: . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index dbf012174c494..dec565707fa78 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1567,7 +1567,9 @@ PHP_FUNCTION(mb_output_handler) char *mimetype = NULL; /* Analyze mime type */ - if (SG(sapi_headers).mimetype && _php_mb_match_regex(MBSTRG(http_output_conv_mimetypes), SG(sapi_headers).mimetype, strlen(SG(sapi_headers).mimetype))) { + if (SG(sapi_headers).mimetype + && MBSTRG(http_output_conv_mimetypes) + && _php_mb_match_regex(MBSTRG(http_output_conv_mimetypes), SG(sapi_headers).mimetype, strlen(SG(sapi_headers).mimetype))) { char *s; if ((s = strchr(SG(sapi_headers).mimetype, ';')) == NULL) { mimetype = estrdup(SG(sapi_headers).mimetype); diff --git a/ext/mbstring/tests/gh17989.phpt b/ext/mbstring/tests/gh17989.phpt new file mode 100644 index 0000000000000..40efd5866c171 --- /dev/null +++ b/ext/mbstring/tests/gh17989.phpt @@ -0,0 +1,16 @@ +--TEST-- +GH-17989 (mb_output_handler crash with unset http_output_conv_mimetypes) +--EXTENSIONS-- +mbstring +--INI-- +mbstring.http_output_conv_mimetypes= +--FILE-- + +--EXPECT-- +set mime type via this echo +hi From 9be9f70caab7e58141d1be145d23cf39d676be0b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 8 Mar 2025 19:38:42 +0100 Subject: [PATCH 18/65] Fix weird unpack behaviour in DOM Engine pitfall: the iter index is only updated by foreach opcodes, so the existing code that used it as an index for the nodes w.r.t. the start did not work properly. Fix it by using our own counter. Closes GH-18004. --- NEWS | 3 ++ ext/dom/dom_iterators.c | 12 ++++---- ext/dom/php_dom.h | 3 ++ ext/dom/tests/unpack_foreach_behaviour.phpt | 31 +++++++++++++++++++++ 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 ext/dom/tests/unpack_foreach_behaviour.phpt diff --git a/NEWS b/NEWS index 02b02bb84bdc0..c3156e8ce4e40 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.19 +- DOM: + . Fix weird unpack behaviour in DOM. (nielsdos) + - GD: . Fixed bug GH-17984 (calls with arguments as array with references). (David Carlier) diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index ff63342595ae9..c8256de239d93 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -158,7 +158,7 @@ static void php_dom_iterator_current_key(zend_object_iterator *iter, zval *key) zval *object = &iterator->intern.data; if (instanceof_function(Z_OBJCE_P(object), dom_nodelist_class_entry)) { - ZVAL_LONG(key, iter->index); + ZVAL_LONG(key, iterator->index); } else { dom_object *intern = Z_DOMOBJ_P(&iterator->curobj); @@ -189,6 +189,8 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */ return; } + iterator->index++; + intern = Z_DOMOBJ_P(&iterator->curobj); object = &iterator->intern.data; nnmap = Z_DOMOBJ_P(object); @@ -227,18 +229,18 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */ curnode = basenode->children; } } else { - previndex = iter->index - 1; + previndex = iterator->index - 1; curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->ptr)->node; } curnode = dom_get_elements_by_tag_name_ns_raw( - basenode, curnode, (char *) objmap->ns, (char *) objmap->local, &previndex, iter->index); + basenode, curnode, (char *) objmap->ns, (char *) objmap->local, &previndex, iterator->index); } } } else { if (objmap->nodetype == XML_ENTITY_NODE) { - curnode = php_dom_libxml_hash_iter(objmap->ht, iter->index); + curnode = php_dom_libxml_hash_iter(objmap->ht, iterator->index); } else { - curnode = php_dom_libxml_notation_iter(objmap->ht, iter->index); + curnode = php_dom_libxml_notation_iter(objmap->ht, iterator->index); } } } diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index 2bccb2d5692d5..120af4267658c 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -98,6 +98,9 @@ typedef struct { zend_object_iterator intern; zval curobj; HashPosition pos; + /* intern->index is only updated for FE_* opcodes, not for e.g. unpacking, + * yet we need to track the position of the node relative to the start. */ + zend_ulong index; php_libxml_cache_tag cache_tag; } php_dom_iterator; diff --git a/ext/dom/tests/unpack_foreach_behaviour.phpt b/ext/dom/tests/unpack_foreach_behaviour.phpt new file mode 100644 index 0000000000000..42fe896d9f786 --- /dev/null +++ b/ext/dom/tests/unpack_foreach_behaviour.phpt @@ -0,0 +1,31 @@ +--TEST-- +Unpacking vs foreach behaviour +--EXTENSIONS-- +dom +--FILE-- +loadXML(''); + +echo "--- By foreach: ---\n"; + +foreach ($dom->documentElement->getElementsByTagName('*') as $node) { + var_dump($node->localName); +} + +echo "--- By unpacking: ---\n"; + +$iter = $dom->documentElement->getElementsByTagName('*'); +foreach ([...$iter] as $node) { + var_dump($node->localName); +} + +?> +--EXPECT-- +--- By foreach: --- +string(1) "a" +string(1) "b" +--- By unpacking: --- +string(1) "a" +string(1) "b" From d6172ce37ae37e1d5a54db6b3cdffb78b2ca99d1 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 10 Mar 2025 11:24:20 +0100 Subject: [PATCH 19/65] [skip ci] Ignore snmp test on asan that frequently times out Not sure why this happens only on master. Cherry-picked from becf207d0c59a48b737d5a177a83f5b233f9bfa0 No longer happens just on master. ;) --- ext/snmp/tests/gh16959.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/snmp/tests/gh16959.phpt b/ext/snmp/tests/gh16959.phpt index ce647b15b9dac..cabe0eb84b6cb 100644 --- a/ext/snmp/tests/gh16959.phpt +++ b/ext/snmp/tests/gh16959.phpt @@ -5,6 +5,7 @@ snmp --SKIPIF-- --FILE-- Date: Sat, 8 Mar 2025 15:21:18 +0100 Subject: [PATCH 20/65] Increase CircleCI no_output_timeout Closes GH-18002 --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d9ad3f7c0a658..b440bd643e6f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -166,6 +166,7 @@ jobs: `#--enable-werror` - run: name: make + no_output_timeout: 30m command: make -j2 > /dev/null - run: name: make install @@ -177,6 +178,7 @@ jobs: echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini - run: name: Test + no_output_timeout: 30m command: | sapi/cli/php run-tests.php \ -d zend_extension=opcache.so \ From f209eb448e765fd920ab79c0abaf083ea275529b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 10 Mar 2025 20:22:11 +0100 Subject: [PATCH 21/65] Fix tests for libxml2 2.14 See GH-18009. --- ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt | 4 ++++ ext/dom/tests/bug69679.phpt | 4 ++-- ext/dom/tests/bug78025.phpt | 3 +-- ext/dom/tests/bug80268_2.phpt | 7 ++----- ext/simplexml/tests/bug51615.phpt | 7 ++----- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt index 3519a9fa215f4..f6ebd25761b06 100644 --- a/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt +++ b/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt @@ -8,6 +8,10 @@ Antonio Diaz Ruiz assert.bail=true --EXTENSIONS-- dom +--SKIPIF-- += 21400) die("skip libxml >= 2.14 no longer has this non-standard warning"); +?> --FILE-- U+0000 loadHTML($html); print($doc->saveHTML()); ?> ---EXPECT-- +--EXPECTF-- -U+0000 +U+0000 %r(�|)%r diff --git a/ext/dom/tests/bug78025.phpt b/ext/dom/tests/bug78025.phpt index 910f7728c3c2c..d6f84939c5f14 100644 --- a/ext/dom/tests/bug78025.phpt +++ b/ext/dom/tests/bug78025.phpt @@ -6,9 +6,8 @@ dom "; $dom = new DOMDocument; -$dom->loadHTML($htm); +$dom->loadHTML($htm, LIBXML_NOERROR); var_dump($dom->doctype->name); ?> --EXPECTF-- -Warning: DOMDocument::loadHTML(): htmlParseDocTypeDecl : no DOCTYPE name ! in Entity, line: 1 in %s on line %d string(0) "" diff --git a/ext/dom/tests/bug80268_2.phpt b/ext/dom/tests/bug80268_2.phpt index af8cf7faca5a5..dcde29e6835a7 100644 --- a/ext/dom/tests/bug80268_2.phpt +++ b/ext/dom/tests/bug80268_2.phpt @@ -9,13 +9,13 @@ if (LIBXML_VERSION < 20912) die('skip For libxml2 >= 2.9.12 only'); --FILE-- loadHTML("

foo\0bar

"); +$doc->loadHTML("

foo\0bar

", LIBXML_NOERROR); $html = $doc->saveHTML(); var_dump(strpos($html, '

foo

') !== false); file_put_contents(__DIR__ . '/80268.html', "

foo\0bar

"); $doc = new DOMDocument; -$doc->loadHTMLFile(__DIR__ . '/80268.html'); +$doc->loadHTMLFile(__DIR__ . '/80268.html', LIBXML_NOERROR); $html = $doc->saveHTML(); var_dump(strpos($html, '

foo

') !== false); ?> @@ -24,8 +24,5 @@ var_dump(strpos($html, '

foo

') !== false); unlink(__DIR__ . '/80268.html'); ?> --EXPECTF-- -Warning: DOMDocument::loadHTML(): Char 0x0 out of allowed range in Entity, line: 1 in %s on line %d bool(false) - -Warning: DOMDocument::loadHTMLFile(): Char 0x0 out of allowed range in %s on line %d bool(false) diff --git a/ext/simplexml/tests/bug51615.phpt b/ext/simplexml/tests/bug51615.phpt index b0ac921fead2a..7245434ff5578 100644 --- a/ext/simplexml/tests/bug51615.phpt +++ b/ext/simplexml/tests/bug51615.phpt @@ -7,7 +7,7 @@ dom loadHTML('xx'); +$dom->loadHTML('xx', LIBXML_NOERROR); $html = simplexml_import_dom($dom); var_dump($html->body->span); @@ -18,15 +18,12 @@ foreach ($html->body->span as $obj) { ?> --EXPECTF-- -Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 1 in %s on line %d - -Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 1 in %s on line %d object(SimpleXMLElement)#%d (3) { ["@attributes"]=> array(2) { ["title"]=> string(0) "" - ["y"]=> + [%r("y"{1,2})%r]=> string(0) "" } [0]=> From b5471300d2acc2499408351521cf3a182114466c Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 10 Mar 2025 20:23:23 +0100 Subject: [PATCH 22/65] Fix test GH-16535 for libxml2 2.14 --- ext/dom/tests/gh16535.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dom/tests/gh16535.phpt b/ext/dom/tests/gh16535.phpt index 1c8d282303c88..adb1dfa91f204 100644 --- a/ext/dom/tests/gh16535.phpt +++ b/ext/dom/tests/gh16535.phpt @@ -14,7 +14,7 @@ try { } catch (DOMException $e) { echo $e->getMessage(), "\n"; } -$v2->loadHTML("oU"); +$v2->loadHTML("

oU

"); echo $v2->saveXML(); ?> From 175b962f554b00c5797ce4691832eb0d00ed7370 Mon Sep 17 00:00:00 2001 From: Eric Mann Date: Tue, 11 Mar 2025 12:06:18 -0700 Subject: [PATCH 23/65] Fix NEWS versions for posterity --- NEWS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index c3156e8ce4e40..f8f13f016bc88 100644 --- a/NEWS +++ b/NEWS @@ -16,7 +16,7 @@ PHP NEWS - Treewide: . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos) -27 Feb 2025, PHP 8.3.18RC1 +27 Feb 2025, PHP 8.3.18 - BCMath: . Fixed bug GH-17398 (bcmul memory leak). (SakiTakamachi) @@ -177,7 +177,7 @@ PHP NEWS . Fixed bug GH-17139 (Fix zip_entry_name() crash on invalid entry). (nielsdos) -02 Jan 2025, PHP 8.3.16RC1 +02 Jan 2025, PHP 8.3.16 - Core: . Fixed bug GH-17106 (ZEND_MATCH_ERROR misoptimization). (ilutov) @@ -376,7 +376,7 @@ PHP NEWS - Windows: . Fixed bug GH-16849 (Error dialog causes process to hang). (cmb) -07 Nov 2024, PHP 8.3.14RC1 +07 Nov 2024, PHP 8.3.14 - CLI: . Fixed bug GH-16373 (Shebang is not skipped for router script in cli-server @@ -1129,7 +1129,7 @@ PHP NEWS - Treewide: . Fix gcc-14 Wcalloc-transposed-args warnings. (Cristian Rodríguez) -28 Mar 2024, PHP 8.3.5RC1 +28 Mar 2024, PHP 8.3.5 - Core: . Fixed GH-13569 (GC buffer unnecessarily grows up to GC_MAX_BUF_SIZE when @@ -1398,7 +1398,7 @@ PHP NEWS . Fixed bug GH-12980 (tidynode.props.attribute is missing "Boolean Attributes" and empty attributes). (nielsdos) -07 Dec 2023, PHP 8.3.1RC1 +07 Dec 2023, PHP 8.3.1 - Core: . Fixed bug GH-12758 / GH-12768 (Invalid opline in OOM handlers within From d20b4c97a9f883b62b65b82d939c5af9a2028ef1 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 31 Dec 2024 18:57:02 +0100 Subject: [PATCH 24/65] Fix GHSA-ghsa-v8xr-gpvj-cx9g: http header folding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds HTTP header folding support for HTTP wrapper response headers. Reviewed-by: Tim Düsterhus --- ext/standard/http_fopen_wrapper.c | 343 ++++++++++++------ .../tests/http/ghsa-v8xr-gpvj-cx9g-001.phpt | 49 +++ .../tests/http/ghsa-v8xr-gpvj-cx9g-002.phpt | 51 +++ .../tests/http/ghsa-v8xr-gpvj-cx9g-003.phpt | 49 +++ .../tests/http/ghsa-v8xr-gpvj-cx9g-004.phpt | 48 +++ .../tests/http/ghsa-v8xr-gpvj-cx9g-005.phpt | 48 +++ .../tests/http/http_response_header_05.phpt | 30 -- 7 files changed, 484 insertions(+), 134 deletions(-) create mode 100644 ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-001.phpt create mode 100644 ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-002.phpt create mode 100644 ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-003.phpt create mode 100644 ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-004.phpt create mode 100644 ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-005.phpt delete mode 100644 ext/standard/tests/http/http_response_header_05.phpt diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 0a1cf0c5bf046..66f356222b4e0 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -115,6 +115,171 @@ static bool check_has_header(const char *headers, const char *header) { return 0; } +typedef struct _php_stream_http_response_header_info { + php_stream_filter *transfer_encoding; + size_t file_size; + bool follow_location; + char location[HTTP_HEADER_BLOCK_SIZE]; +} php_stream_http_response_header_info; + +static void php_stream_http_response_header_info_init( + php_stream_http_response_header_info *header_info) +{ + header_info->transfer_encoding = NULL; + header_info->file_size = 0; + header_info->follow_location = 1; + header_info->location[0] = '\0'; +} + +/* Trim white spaces from response header line and update its length */ +static bool php_stream_http_response_header_trim(char *http_header_line, + size_t *http_header_line_length) +{ + char *http_header_line_end = http_header_line + *http_header_line_length - 1; + while (http_header_line_end >= http_header_line && + (*http_header_line_end == '\n' || *http_header_line_end == '\r')) { + http_header_line_end--; + } + + /* The primary definition of an HTTP header in RFC 7230 states: + * > Each header field consists of a case-insensitive field name followed + * > by a colon (":"), optional leading whitespace, the field value, and + * > optional trailing whitespace. */ + + /* Strip trailing whitespace */ + bool space_trim = (*http_header_line_end == ' ' || *http_header_line_end == '\t'); + if (space_trim) { + do { + http_header_line_end--; + } while (http_header_line_end >= http_header_line && + (*http_header_line_end == ' ' || *http_header_line_end == '\t')); + } + http_header_line_end++; + *http_header_line_end = '\0'; + *http_header_line_length = http_header_line_end - http_header_line; + + return space_trim; +} + +/* Process folding headers of the current line and if there are none, parse last full response + * header line. It returns NULL if the last header is finished, otherwise it returns updated + * last header line. */ +static zend_string *php_stream_http_response_headers_parse(php_stream *stream, + php_stream_context *context, int options, zend_string *last_header_line_str, + char *header_line, size_t *header_line_length, int response_code, + zval *response_header, php_stream_http_response_header_info *header_info) +{ + char *last_header_line = ZSTR_VAL(last_header_line_str); + size_t last_header_line_length = ZSTR_LEN(last_header_line_str); + char *last_header_line_end = ZSTR_VAL(last_header_line_str) + ZSTR_LEN(last_header_line_str) - 1; + + /* Process non empty header line. */ + if (header_line && (*header_line != '\n' && *header_line != '\r')) { + /* Removing trailing white spaces. */ + if (php_stream_http_response_header_trim(header_line, header_line_length) && + *header_line_length == 0) { + /* Only spaces so treat as an empty folding header. */ + return last_header_line_str; + } + + /* Process folding headers if starting with a space or a tab. */ + if (header_line && (*header_line == ' ' || *header_line == '\t')) { + char *http_folded_header_line = header_line; + size_t http_folded_header_line_length = *header_line_length; + /* Remove the leading white spaces. */ + while (*http_folded_header_line == ' ' || *http_folded_header_line == '\t') { + http_folded_header_line++; + http_folded_header_line_length--; + } + /* It has to have some characters because it would get returned after the call + * php_stream_http_response_header_trim above. */ + ZEND_ASSERT(http_folded_header_line_length > 0); + /* Concatenate last header line, space and current header line. */ + zend_string *extended_header_str = zend_string_concat3( + last_header_line, last_header_line_length, + " ", 1, + http_folded_header_line, http_folded_header_line_length); + zend_string_efree(last_header_line_str); + last_header_line_str = extended_header_str; + /* Return new header line. */ + return last_header_line_str; + } + } + + /* Find header separator position. */ + char *last_header_value = memchr(last_header_line, ':', last_header_line_length); + if (last_header_value) { + last_header_value++; /* Skip ':'. */ + + /* Strip leading whitespace. */ + while (last_header_value < last_header_line_end + && (*last_header_value == ' ' || *last_header_value == '\t')) { + last_header_value++; + } + } else { + /* There is no colon. Set the value to the end of the header line, which is effectively + * an empty string. */ + last_header_value = last_header_line_end; + } + + bool store_header = true; + zval *tmpzval = NULL; + + if (!strncasecmp(last_header_line, "Location:", sizeof("Location:")-1)) { + /* Check if the location should be followed. */ + if (context && (tmpzval = php_stream_context_get_option(context, "http", "follow_location")) != NULL) { + header_info->follow_location = zval_is_true(tmpzval); + } else if (!((response_code >= 300 && response_code < 304) + || 307 == response_code || 308 == response_code)) { + /* The redirection should not be automatic if follow_location is not set and + * response_code not in (300, 301, 302, 303 and 307) + * see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1 + * RFC 7238 defines 308: http://tools.ietf.org/html/rfc7238 */ + header_info->follow_location = 0; + } + strlcpy(header_info->location, last_header_value, sizeof(header_info->location)); + } else if (!strncasecmp(last_header_line, "Content-Type:", sizeof("Content-Type:")-1)) { + php_stream_notify_info(context, PHP_STREAM_NOTIFY_MIME_TYPE_IS, last_header_value, 0); + } else if (!strncasecmp(last_header_line, "Content-Length:", sizeof("Content-Length:")-1)) { + header_info->file_size = atoi(last_header_value); + php_stream_notify_file_size(context, header_info->file_size, last_header_line, 0); + } else if ( + !strncasecmp(last_header_line, "Transfer-Encoding:", sizeof("Transfer-Encoding:")-1) + && !strncasecmp(last_header_value, "Chunked", sizeof("Chunked")-1) + ) { + /* Create filter to decode response body. */ + if (!(options & STREAM_ONLY_GET_HEADERS)) { + zend_long decode = 1; + + if (context && (tmpzval = php_stream_context_get_option(context, "http", "auto_decode")) != NULL) { + decode = zend_is_true(tmpzval); + } + if (decode) { + if (header_info->transfer_encoding != NULL) { + /* Prevent a memory leak in case there are more transfer-encoding headers. */ + php_stream_filter_free(header_info->transfer_encoding); + } + header_info->transfer_encoding = php_stream_filter_create( + "dechunk", NULL, php_stream_is_persistent(stream)); + if (header_info->transfer_encoding != NULL) { + /* Do not store transfer-encoding header. */ + store_header = false; + } + } + } + } + + if (store_header) { + zval http_header; + ZVAL_NEW_STR(&http_header, last_header_line_str); + zend_hash_next_index_insert(Z_ARRVAL_P(response_header), &http_header); + } else { + zend_string_efree(last_header_line_str); + } + + return NULL; +} + static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context, int redirect_max, int flags, @@ -127,11 +292,12 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, zend_string *tmp = NULL; char *ua_str = NULL; zval *ua_zval = NULL, *tmpzval = NULL, ssl_proxy_peer_name; - char location[HTTP_HEADER_BLOCK_SIZE]; int reqok = 0; char *http_header_line = NULL; + zend_string *last_header_line_str = NULL; + php_stream_http_response_header_info header_info; char tmp_line[128]; - size_t chunk_size = 0, file_size = 0; + size_t chunk_size = 0; int eol_detect = 0; zend_string *transport_string; zend_string *errstr = NULL; @@ -142,8 +308,6 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, int header_init = ((flags & HTTP_WRAPPER_HEADER_INIT) != 0); int redirected = ((flags & HTTP_WRAPPER_REDIRECTED) != 0); int redirect_keep_method = ((flags & HTTP_WRAPPER_KEEP_METHOD) != 0); - bool follow_location = 1; - php_stream_filter *transfer_encoding = NULL; int response_code; smart_str req_buf = {0}; bool custom_request_method; @@ -653,8 +817,6 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, /* send it */ php_stream_write(stream, ZSTR_VAL(req_buf.s), ZSTR_LEN(req_buf.s)); - location[0] = '\0'; - if (Z_ISUNDEF_P(response_header)) { array_init(response_header); } @@ -736,130 +898,101 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, } } - /* read past HTTP headers */ + php_stream_http_response_header_info_init(&header_info); + /* read past HTTP headers */ while (!php_stream_eof(stream)) { size_t http_header_line_length; if (http_header_line != NULL) { efree(http_header_line); } - if ((http_header_line = php_stream_get_line(stream, NULL, 0, &http_header_line_length)) && *http_header_line != '\n' && *http_header_line != '\r') { - char *e = http_header_line + http_header_line_length - 1; - char *http_header_value; - - while (e >= http_header_line && (*e == '\n' || *e == '\r')) { - e--; - } - - /* The primary definition of an HTTP header in RFC 7230 states: - * > Each header field consists of a case-insensitive field name followed - * > by a colon (":"), optional leading whitespace, the field value, and - * > optional trailing whitespace. */ - - /* Strip trailing whitespace */ - while (e >= http_header_line && (*e == ' ' || *e == '\t')) { - e--; - } - - /* Terminate header line */ - e++; - *e = '\0'; - http_header_line_length = e - http_header_line; - - http_header_value = memchr(http_header_line, ':', http_header_line_length); - if (http_header_value) { - http_header_value++; /* Skip ':' */ - - /* Strip leading whitespace */ - while (http_header_value < e - && (*http_header_value == ' ' || *http_header_value == '\t')) { - http_header_value++; + if ((http_header_line = php_stream_get_line(stream, NULL, 0, &http_header_line_length))) { + bool last_line; + if (*http_header_line == '\r') { + if (http_header_line[1] != '\n') { + php_stream_close(stream); + stream = NULL; + php_stream_wrapper_log_error(wrapper, options, + "HTTP invalid header name (cannot start with CR character)!"); + goto out; } + last_line = true; + } else if (*http_header_line == '\n') { + last_line = true; } else { - /* There is no colon. Set the value to the end of the header line, which is - * effectively an empty string. */ - http_header_value = e; + last_line = false; } - - if (!strncasecmp(http_header_line, "Location:", sizeof("Location:")-1)) { - if (context && (tmpzval = php_stream_context_get_option(context, "http", "follow_location")) != NULL) { - follow_location = zval_is_true(tmpzval); - } else if (!((response_code >= 300 && response_code < 304) - || 307 == response_code || 308 == response_code)) { - /* we shouldn't redirect automatically - if follow_location isn't set and response_code not in (300, 301, 302, 303 and 307) - see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1 - RFC 7238 defines 308: http://tools.ietf.org/html/rfc7238 */ - follow_location = 0; + + if (last_header_line_str != NULL) { + /* Parse last header line. */ + last_header_line_str = php_stream_http_response_headers_parse(stream, context, + options, last_header_line_str, http_header_line, &http_header_line_length, + response_code, response_header, &header_info); + if (last_header_line_str != NULL) { + /* Folding header present so continue. */ + continue; } - strlcpy(location, http_header_value, sizeof(location)); - } else if (!strncasecmp(http_header_line, "Content-Type:", sizeof("Content-Type:")-1)) { - php_stream_notify_info(context, PHP_STREAM_NOTIFY_MIME_TYPE_IS, http_header_value, 0); - } else if (!strncasecmp(http_header_line, "Content-Length:", sizeof("Content-Length:")-1)) { - file_size = atoi(http_header_value); - php_stream_notify_file_size(context, file_size, http_header_line, 0); - } else if ( - !strncasecmp(http_header_line, "Transfer-Encoding:", sizeof("Transfer-Encoding:")-1) - && !strncasecmp(http_header_value, "Chunked", sizeof("Chunked")-1) - ) { - - /* create filter to decode response body */ - if (!(options & STREAM_ONLY_GET_HEADERS)) { - zend_long decode = 1; - - if (context && (tmpzval = php_stream_context_get_option(context, "http", "auto_decode")) != NULL) { - decode = zend_is_true(tmpzval); - } - if (decode) { - transfer_encoding = php_stream_filter_create("dechunk", NULL, php_stream_is_persistent(stream)); - if (transfer_encoding) { - /* don't store transfer-encodeing header */ - continue; - } - } + } else if (!last_line) { + /* The first line cannot start with spaces. */ + if (*http_header_line == ' ' || *http_header_line == '\t') { + php_stream_close(stream); + stream = NULL; + php_stream_wrapper_log_error(wrapper, options, + "HTTP invalid response format (folding header at the start)!"); + goto out; } + /* Trim the first line if it is not the last line. */ + php_stream_http_response_header_trim(http_header_line, &http_header_line_length); } - - { - zval http_header; - ZVAL_STRINGL(&http_header, http_header_line, http_header_line_length); - zend_hash_next_index_insert(Z_ARRVAL_P(response_header), &http_header); + if (last_line) { + /* For the last line the last header line must be NULL. */ + ZEND_ASSERT(last_header_line_str == NULL); + break; } + /* Save current line as the last line so it gets parsed in the next round. */ + last_header_line_str = zend_string_init(http_header_line, http_header_line_length, 0); } else { break; } } - if (!reqok || (location[0] != '\0' && follow_location)) { - if (!follow_location || (((options & STREAM_ONLY_GET_HEADERS) || ignore_errors) && redirect_max <= 1)) { + /* If the stream was closed early, we still want to process the last line to keep BC. */ + if (last_header_line_str != NULL) { + php_stream_http_response_headers_parse(stream, context, options, last_header_line_str, + NULL, NULL, response_code, response_header, &header_info); + } + + if (!reqok || (header_info.location[0] != '\0' && header_info.follow_location)) { + if (!header_info.follow_location || (((options & STREAM_ONLY_GET_HEADERS) || ignore_errors) && redirect_max <= 1)) { goto out; } - if (location[0] != '\0') - php_stream_notify_info(context, PHP_STREAM_NOTIFY_REDIRECTED, location, 0); + if (header_info.location[0] != '\0') + php_stream_notify_info(context, PHP_STREAM_NOTIFY_REDIRECTED, header_info.location, 0); php_stream_close(stream); stream = NULL; - if (transfer_encoding) { - php_stream_filter_free(transfer_encoding); - transfer_encoding = NULL; + if (header_info.transfer_encoding) { + php_stream_filter_free(header_info.transfer_encoding); + header_info.transfer_encoding = NULL; } - if (location[0] != '\0') { + if (header_info.location[0] != '\0') { char new_path[HTTP_HEADER_BLOCK_SIZE]; char loc_path[HTTP_HEADER_BLOCK_SIZE]; *new_path='\0'; - if (strlen(location)<8 || (strncasecmp(location, "http://", sizeof("http://")-1) && - strncasecmp(location, "https://", sizeof("https://")-1) && - strncasecmp(location, "ftp://", sizeof("ftp://")-1) && - strncasecmp(location, "ftps://", sizeof("ftps://")-1))) + if (strlen(header_info.location) < 8 || + (strncasecmp(header_info.location, "http://", sizeof("http://")-1) && + strncasecmp(header_info.location, "https://", sizeof("https://")-1) && + strncasecmp(header_info.location, "ftp://", sizeof("ftp://")-1) && + strncasecmp(header_info.location, "ftps://", sizeof("ftps://")-1))) { - if (*location != '/') { - if (*(location+1) != '\0' && resource->path) { + if (*header_info.location != '/') { + if (*(header_info.location+1) != '\0' && resource->path) { char *s = strrchr(ZSTR_VAL(resource->path), '/'); if (!s) { s = ZSTR_VAL(resource->path); @@ -875,15 +1008,17 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, if (resource->path && ZSTR_VAL(resource->path)[0] == '/' && ZSTR_VAL(resource->path)[1] == '\0') { - snprintf(loc_path, sizeof(loc_path) - 1, "%s%s", ZSTR_VAL(resource->path), location); + snprintf(loc_path, sizeof(loc_path) - 1, "%s%s", + ZSTR_VAL(resource->path), header_info.location); } else { - snprintf(loc_path, sizeof(loc_path) - 1, "%s/%s", ZSTR_VAL(resource->path), location); + snprintf(loc_path, sizeof(loc_path) - 1, "%s/%s", + ZSTR_VAL(resource->path), header_info.location); } } else { - snprintf(loc_path, sizeof(loc_path) - 1, "/%s", location); + snprintf(loc_path, sizeof(loc_path) - 1, "/%s", header_info.location); } } else { - strlcpy(loc_path, location, sizeof(loc_path)); + strlcpy(loc_path, header_info.location, sizeof(loc_path)); } if ((use_ssl && resource->port != 443) || (!use_ssl && resource->port != 80)) { snprintf(new_path, sizeof(new_path) - 1, "%s://%s:%d%s", ZSTR_VAL(resource->scheme), ZSTR_VAL(resource->host), resource->port, loc_path); @@ -891,7 +1026,7 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, snprintf(new_path, sizeof(new_path) - 1, "%s://%s%s", ZSTR_VAL(resource->scheme), ZSTR_VAL(resource->host), loc_path); } } else { - strlcpy(new_path, location, sizeof(new_path)); + strlcpy(new_path, header_info.location, sizeof(new_path)); } php_url_free(resource); @@ -951,7 +1086,7 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, if (header_init) { ZVAL_COPY(&stream->wrapperdata, response_header); } - php_stream_notify_progress_init(context, 0, file_size); + php_stream_notify_progress_init(context, 0, header_info.file_size); /* Restore original chunk size now that we're done with headers */ if (options & STREAM_WILL_CAST) @@ -967,8 +1102,8 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, /* restore mode */ strlcpy(stream->mode, mode, sizeof(stream->mode)); - if (transfer_encoding) { - php_stream_filter_append(&stream->readfilters, transfer_encoding); + if (header_info.transfer_encoding) { + php_stream_filter_append(&stream->readfilters, header_info.transfer_encoding); } /* It's possible that the server already sent in more data than just the headers. diff --git a/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-001.phpt b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-001.phpt new file mode 100644 index 0000000000000..f935b5a02ca94 --- /dev/null +++ b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-001.phpt @@ -0,0 +1,49 @@ +--TEST-- +GHSA-v8xr-gpvj-cx9g: Header parser of http stream wrapper does not handle folded headers (single) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + fwrite($conn, "HTTP/1.0 200 Ok\r\nContent-Type: text/html;\r\n charset=utf-8\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(trim(file_get_contents("http://{{ ADDR }}", false, $ctx))); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +Found the mime-type: text/html; charset=utf-8 +string(4) "body" +array(2) { + [0]=> + string(15) "HTTP/1.0 200 Ok" + [1]=> + string(38) "Content-Type: text/html; charset=utf-8" +} diff --git a/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-002.phpt b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-002.phpt new file mode 100644 index 0000000000000..078d605b6718f --- /dev/null +++ b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-002.phpt @@ -0,0 +1,51 @@ +--TEST-- +GHSA-v8xr-gpvj-cx9g: Header parser of http stream wrapper does not handle folded headers (multiple) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + fwrite($conn, "HTTP/1.0 200 Ok\r\nContent-Type: text/html;\r\nCustom-Header: somevalue;\r\n param1=value1; \r\n param2=value2\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(trim(file_get_contents("http://{{ ADDR }}", false, $ctx))); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +Found the mime-type: text/html; +string(4) "body" +array(3) { + [0]=> + string(15) "HTTP/1.0 200 Ok" + [1]=> + string(24) "Content-Type: text/html;" + [2]=> + string(54) "Custom-Header: somevalue; param1=value1; param2=value2" +} diff --git a/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-003.phpt b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-003.phpt new file mode 100644 index 0000000000000..ad5ddc879cead --- /dev/null +++ b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-003.phpt @@ -0,0 +1,49 @@ +--TEST-- +GHSA-v8xr-gpvj-cx9g: Header parser of http stream wrapper does not handle folded headers (empty) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + fwrite($conn, "HTTP/1.0 200 Ok\r\nContent-Type: text/html;\r\n \r\n charset=utf-8\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(trim(file_get_contents("http://{{ ADDR }}", false, $ctx))); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +Found the mime-type: text/html; charset=utf-8 +string(4) "body" +array(2) { + [0]=> + string(15) "HTTP/1.0 200 Ok" + [1]=> + string(38) "Content-Type: text/html; charset=utf-8" +} diff --git a/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-004.phpt b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-004.phpt new file mode 100644 index 0000000000000..d0396e819fbd3 --- /dev/null +++ b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-004.phpt @@ -0,0 +1,48 @@ +--TEST-- +GHSA-v8xr-gpvj-cx9g: Header parser of http stream wrapper does not handle folded headers (first line) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + fwrite($conn, "HTTP/1.0 200 Ok\r\n Content-Type: text/html;\r\n \r\n charset=utf-8\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(file_get_contents("http://{{ ADDR }}", false, $ctx)); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- + +Warning: file_get_contents(http://127.0.0.1:%d): Failed to open stream: HTTP invalid response format (folding header at the start)! in %s +bool(false) +array(1) { + [0]=> + string(15) "HTTP/1.0 200 Ok" +} diff --git a/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-005.phpt b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-005.phpt new file mode 100644 index 0000000000000..037d2002cc537 --- /dev/null +++ b/ext/standard/tests/http/ghsa-v8xr-gpvj-cx9g-005.phpt @@ -0,0 +1,48 @@ +--TEST-- +GHSA-v8xr-gpvj-cx9g: Header parser of http stream wrapper does not handle folded headers (CR before header name) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + fwrite($conn, "HTTP/1.0 200 Ok\r\n\rIgnored: ignored\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(file_get_contents("http://{{ ADDR }}", false, $ctx)); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- + +Warning: file_get_contents(http://127.0.0.1:%d): Failed to open stream: HTTP invalid header name (cannot start with CR character)! in %s +bool(false) +array(1) { + [0]=> + string(15) "HTTP/1.0 200 Ok" +} diff --git a/ext/standard/tests/http/http_response_header_05.phpt b/ext/standard/tests/http/http_response_header_05.phpt deleted file mode 100644 index c5fe60fa612b7..0000000000000 --- a/ext/standard/tests/http/http_response_header_05.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -$http_reponse_header (whitespace-only "header") ---SKIPIF-- - ---INI-- -allow_url_fopen=1 ---FILE-- - $pid, 'uri' => $uri] = http_server($responses, $output); - -$f = file_get_contents($uri); -var_dump($f); -var_dump($http_response_header); - -http_server_kill($pid); - ---EXPECT-- -string(4) "Body" -array(2) { - [0]=> - string(15) "HTTP/1.0 200 Ok" - [1]=> - string(0) "" -} From 0548c4c1756724a89ef8310709419b08aadb2b3b Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 19 Jan 2025 17:49:53 +0100 Subject: [PATCH 25/65] Fix GHSA-pcmh-g36c-qc44: http headers without colon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header line must contain colon otherwise it is invalid and it needs to fail. Reviewed-by: Tim Düsterhus --- ext/standard/http_fopen_wrapper.c | 51 ++++++++++++++----- ext/standard/tests/http/bug47021.phpt | 22 ++++---- ext/standard/tests/http/bug75535.phpt | 4 +- .../tests/http/ghsa-pcmh-g36c-qc44-001.phpt | 51 +++++++++++++++++++ .../tests/http/ghsa-pcmh-g36c-qc44-002.phpt | 51 +++++++++++++++++++ 5 files changed, 154 insertions(+), 25 deletions(-) create mode 100644 ext/standard/tests/http/ghsa-pcmh-g36c-qc44-001.phpt create mode 100644 ext/standard/tests/http/ghsa-pcmh-g36c-qc44-002.phpt diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 66f356222b4e0..66daa9134afbc 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -118,6 +118,7 @@ static bool check_has_header(const char *headers, const char *header) { typedef struct _php_stream_http_response_header_info { php_stream_filter *transfer_encoding; size_t file_size; + bool error; bool follow_location; char location[HTTP_HEADER_BLOCK_SIZE]; } php_stream_http_response_header_info; @@ -127,6 +128,7 @@ static void php_stream_http_response_header_info_init( { header_info->transfer_encoding = NULL; header_info->file_size = 0; + header_info->error = false; header_info->follow_location = 1; header_info->location[0] = '\0'; } @@ -164,10 +166,11 @@ static bool php_stream_http_response_header_trim(char *http_header_line, /* Process folding headers of the current line and if there are none, parse last full response * header line. It returns NULL if the last header is finished, otherwise it returns updated * last header line. */ -static zend_string *php_stream_http_response_headers_parse(php_stream *stream, - php_stream_context *context, int options, zend_string *last_header_line_str, - char *header_line, size_t *header_line_length, int response_code, - zval *response_header, php_stream_http_response_header_info *header_info) +static zend_string *php_stream_http_response_headers_parse(php_stream_wrapper *wrapper, + php_stream *stream, php_stream_context *context, int options, + zend_string *last_header_line_str, char *header_line, size_t *header_line_length, + int response_code, zval *response_header, + php_stream_http_response_header_info *header_info) { char *last_header_line = ZSTR_VAL(last_header_line_str); size_t last_header_line_length = ZSTR_LEN(last_header_line_str); @@ -209,6 +212,19 @@ static zend_string *php_stream_http_response_headers_parse(php_stream *stream, /* Find header separator position. */ char *last_header_value = memchr(last_header_line, ':', last_header_line_length); if (last_header_value) { + /* Verify there is no space in header name */ + char *last_header_name = last_header_line + 1; + while (last_header_name < last_header_value) { + if (*last_header_name == ' ' || *last_header_name == '\t') { + header_info->error = true; + php_stream_wrapper_log_error(wrapper, options, + "HTTP invalid response format (space in header name)!"); + zend_string_efree(last_header_line_str); + return NULL; + } + ++last_header_name; + } + last_header_value++; /* Skip ':'. */ /* Strip leading whitespace. */ @@ -217,9 +233,12 @@ static zend_string *php_stream_http_response_headers_parse(php_stream *stream, last_header_value++; } } else { - /* There is no colon. Set the value to the end of the header line, which is effectively - * an empty string. */ - last_header_value = last_header_line_end; + /* There is no colon which means invalid response so error. */ + header_info->error = true; + php_stream_wrapper_log_error(wrapper, options, + "HTTP invalid response format (no colon in header line)!"); + zend_string_efree(last_header_line_str); + return NULL; } bool store_header = true; @@ -926,10 +945,16 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, if (last_header_line_str != NULL) { /* Parse last header line. */ - last_header_line_str = php_stream_http_response_headers_parse(stream, context, - options, last_header_line_str, http_header_line, &http_header_line_length, - response_code, response_header, &header_info); - if (last_header_line_str != NULL) { + last_header_line_str = php_stream_http_response_headers_parse(wrapper, stream, + context, options, last_header_line_str, http_header_line, + &http_header_line_length, response_code, response_header, &header_info); + if (EXPECTED(last_header_line_str == NULL)) { + if (UNEXPECTED(header_info.error)) { + php_stream_close(stream); + stream = NULL; + goto out; + } + } else { /* Folding header present so continue. */ continue; } @@ -959,8 +984,8 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, /* If the stream was closed early, we still want to process the last line to keep BC. */ if (last_header_line_str != NULL) { - php_stream_http_response_headers_parse(stream, context, options, last_header_line_str, - NULL, NULL, response_code, response_header, &header_info); + php_stream_http_response_headers_parse(wrapper, stream, context, options, + last_header_line_str, NULL, NULL, response_code, response_header, &header_info); } if (!reqok || (header_info.location[0] != '\0' && header_info.follow_location)) { diff --git a/ext/standard/tests/http/bug47021.phpt b/ext/standard/tests/http/bug47021.phpt index 326eceb687a52..168721f4ec1b6 100644 --- a/ext/standard/tests/http/bug47021.phpt +++ b/ext/standard/tests/http/bug47021.phpt @@ -70,23 +70,27 @@ do_test(1, true); echo "\n"; ?> ---EXPECT-- +--EXPECTF-- + Type='text/plain' Hello -Size=5 -World + +Warning: file_get_contents(http://%s:%d): Failed to open stream: HTTP invalid response format (no colon in header line)! in %s + Type='text/plain' Hello -Size=5 -World + +Warning: file_get_contents(http://%s:%d): Failed to open stream: HTTP invalid response format (no colon in header line)! in %s + Type='text/plain' Hello -Size=5 -World + +Warning: file_get_contents(http://%s:%d): Failed to open stream: HTTP invalid response format (no colon in header line)! in %s + Type='text/plain' Hello -Size=5 -World + +Warning: file_get_contents(http://%s:%d): Failed to open stream: HTTP invalid response format (no colon in header line)! in %s diff --git a/ext/standard/tests/http/bug75535.phpt b/ext/standard/tests/http/bug75535.phpt index 7b015890d2f51..94348d1a027aa 100644 --- a/ext/standard/tests/http/bug75535.phpt +++ b/ext/standard/tests/http/bug75535.phpt @@ -21,9 +21,7 @@ http_server_kill($pid); --EXPECT-- string(0) "" -array(2) { +array(1) { [0]=> string(15) "HTTP/1.0 200 Ok" - [1]=> - string(14) "Content-Length" } diff --git a/ext/standard/tests/http/ghsa-pcmh-g36c-qc44-001.phpt b/ext/standard/tests/http/ghsa-pcmh-g36c-qc44-001.phpt new file mode 100644 index 0000000000000..bb7945ce62d0e --- /dev/null +++ b/ext/standard/tests/http/ghsa-pcmh-g36c-qc44-001.phpt @@ -0,0 +1,51 @@ +--TEST-- +GHSA-pcmh-g36c-qc44: Header parser of http stream wrapper does not verify header name and colon (colon) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + fwrite($conn, "HTTP/1.0 200 Ok\r\nContent-Type: text/html\r\nWrong-Header\r\nGood-Header: test\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(file_get_contents("http://{{ ADDR }}", false, $ctx)); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +Found the mime-type: text/html + +Warning: file_get_contents(http://127.0.0.1:%d): Failed to open stream: HTTP invalid response format (no colon in header line)! in %s +bool(false) +array(2) { + [0]=> + string(15) "HTTP/1.0 200 Ok" + [1]=> + string(23) "Content-Type: text/html" +} diff --git a/ext/standard/tests/http/ghsa-pcmh-g36c-qc44-002.phpt b/ext/standard/tests/http/ghsa-pcmh-g36c-qc44-002.phpt new file mode 100644 index 0000000000000..1d0e4fa70a2c9 --- /dev/null +++ b/ext/standard/tests/http/ghsa-pcmh-g36c-qc44-002.phpt @@ -0,0 +1,51 @@ +--TEST-- +GHSA-pcmh-g36c-qc44: Header parser of http stream wrapper does not verify header name and colon (name) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + fwrite($conn, "HTTP/1.0 200 Ok\r\nContent-Type: text/html\r\nWrong-Header : test\r\nGood-Header: test\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(file_get_contents("http://{{ ADDR }}", false, $ctx)); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +Found the mime-type: text/html + +Warning: file_get_contents(http://127.0.0.1:%d): Failed to open stream: HTTP invalid response format (space in header name)! in %s +bool(false) +array(2) { + [0]=> + string(15) "HTTP/1.0 200 Ok" + [1]=> + string(23) "Content-Type: text/html" +} From ac1a054bb3eb5994a199e8b18cca28cbabf5943e Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 4 Mar 2025 09:01:34 +0100 Subject: [PATCH 26/65] Fix GHSA-52jp-hrpf-2jff: http redirect location truncation It converts the allocation of location to be on heap instead of stack and errors if the location length is greater than 8086 bytes. --- ext/standard/http_fopen_wrapper.c | 87 ++++++++++++------- .../tests/http/ghsa-52jp-hrpf-2jff-001.phpt | 58 +++++++++++++ .../tests/http/ghsa-52jp-hrpf-2jff-002.phpt | 55 ++++++++++++ 3 files changed, 168 insertions(+), 32 deletions(-) create mode 100644 ext/standard/tests/http/ghsa-52jp-hrpf-2jff-001.phpt create mode 100644 ext/standard/tests/http/ghsa-52jp-hrpf-2jff-002.phpt diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 66daa9134afbc..dbed175d06421 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -67,15 +67,16 @@ #include "php_fopen_wrappers.h" -#define HTTP_HEADER_BLOCK_SIZE 1024 -#define PHP_URL_REDIRECT_MAX 20 -#define HTTP_HEADER_USER_AGENT 1 -#define HTTP_HEADER_HOST 2 -#define HTTP_HEADER_AUTH 4 -#define HTTP_HEADER_FROM 8 -#define HTTP_HEADER_CONTENT_LENGTH 16 -#define HTTP_HEADER_TYPE 32 -#define HTTP_HEADER_CONNECTION 64 +#define HTTP_HEADER_BLOCK_SIZE 1024 +#define HTTP_HEADER_MAX_LOCATION_SIZE 8182 /* 8192 - 10 (size of "Location: ") */ +#define PHP_URL_REDIRECT_MAX 20 +#define HTTP_HEADER_USER_AGENT 1 +#define HTTP_HEADER_HOST 2 +#define HTTP_HEADER_AUTH 4 +#define HTTP_HEADER_FROM 8 +#define HTTP_HEADER_CONTENT_LENGTH 16 +#define HTTP_HEADER_TYPE 32 +#define HTTP_HEADER_CONNECTION 64 #define HTTP_WRAPPER_HEADER_INIT 1 #define HTTP_WRAPPER_REDIRECTED 2 @@ -120,17 +121,15 @@ typedef struct _php_stream_http_response_header_info { size_t file_size; bool error; bool follow_location; - char location[HTTP_HEADER_BLOCK_SIZE]; + char *location; + size_t location_len; } php_stream_http_response_header_info; static void php_stream_http_response_header_info_init( php_stream_http_response_header_info *header_info) { - header_info->transfer_encoding = NULL; - header_info->file_size = 0; - header_info->error = false; + memset(header_info, 0, sizeof(php_stream_http_response_header_info)); header_info->follow_location = 1; - header_info->location[0] = '\0'; } /* Trim white spaces from response header line and update its length */ @@ -256,7 +255,22 @@ static zend_string *php_stream_http_response_headers_parse(php_stream_wrapper *w * RFC 7238 defines 308: http://tools.ietf.org/html/rfc7238 */ header_info->follow_location = 0; } - strlcpy(header_info->location, last_header_value, sizeof(header_info->location)); + size_t last_header_value_len = strlen(last_header_value); + if (last_header_value_len > HTTP_HEADER_MAX_LOCATION_SIZE) { + header_info->error = true; + php_stream_wrapper_log_error(wrapper, options, + "HTTP Location header size is over the limit of %d bytes", + HTTP_HEADER_MAX_LOCATION_SIZE); + zend_string_efree(last_header_line_str); + return NULL; + } + if (header_info->location_len == 0) { + header_info->location = emalloc(last_header_value_len + 1); + } else if (header_info->location_len <= last_header_value_len) { + header_info->location = erealloc(header_info->location, last_header_value_len + 1); + } + header_info->location_len = last_header_value_len; + memcpy(header_info->location, last_header_value, last_header_value_len + 1); } else if (!strncasecmp(last_header_line, "Content-Type:", sizeof("Content-Type:")-1)) { php_stream_notify_info(context, PHP_STREAM_NOTIFY_MIME_TYPE_IS, last_header_value, 0); } else if (!strncasecmp(last_header_line, "Content-Length:", sizeof("Content-Length:")-1)) { @@ -536,6 +550,8 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, } } + php_stream_http_response_header_info_init(&header_info); + if (stream == NULL) goto out; @@ -917,8 +933,6 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, } } - php_stream_http_response_header_info_init(&header_info); - /* read past HTTP headers */ while (!php_stream_eof(stream)) { size_t http_header_line_length; @@ -988,12 +1002,12 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, last_header_line_str, NULL, NULL, response_code, response_header, &header_info); } - if (!reqok || (header_info.location[0] != '\0' && header_info.follow_location)) { + if (!reqok || (header_info.location != NULL && header_info.follow_location)) { if (!header_info.follow_location || (((options & STREAM_ONLY_GET_HEADERS) || ignore_errors) && redirect_max <= 1)) { goto out; } - if (header_info.location[0] != '\0') + if (header_info.location != NULL) php_stream_notify_info(context, PHP_STREAM_NOTIFY_REDIRECTED, header_info.location, 0); php_stream_close(stream); @@ -1004,18 +1018,17 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, header_info.transfer_encoding = NULL; } - if (header_info.location[0] != '\0') { + if (header_info.location != NULL) { - char new_path[HTTP_HEADER_BLOCK_SIZE]; - char loc_path[HTTP_HEADER_BLOCK_SIZE]; + char *new_path = NULL; - *new_path='\0'; if (strlen(header_info.location) < 8 || (strncasecmp(header_info.location, "http://", sizeof("http://")-1) && strncasecmp(header_info.location, "https://", sizeof("https://")-1) && strncasecmp(header_info.location, "ftp://", sizeof("ftp://")-1) && strncasecmp(header_info.location, "ftps://", sizeof("ftps://")-1))) { + char *loc_path = NULL; if (*header_info.location != '/') { if (*(header_info.location+1) != '\0' && resource->path) { char *s = strrchr(ZSTR_VAL(resource->path), '/'); @@ -1033,31 +1046,35 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, if (resource->path && ZSTR_VAL(resource->path)[0] == '/' && ZSTR_VAL(resource->path)[1] == '\0') { - snprintf(loc_path, sizeof(loc_path) - 1, "%s%s", - ZSTR_VAL(resource->path), header_info.location); + spprintf(&loc_path, 0, "%s%s", ZSTR_VAL(resource->path), header_info.location); } else { - snprintf(loc_path, sizeof(loc_path) - 1, "%s/%s", - ZSTR_VAL(resource->path), header_info.location); + spprintf(&loc_path, 0, "%s/%s", ZSTR_VAL(resource->path), header_info.location); } } else { - snprintf(loc_path, sizeof(loc_path) - 1, "/%s", header_info.location); + spprintf(&loc_path, 0, "/%s", header_info.location); } } else { - strlcpy(loc_path, header_info.location, sizeof(loc_path)); + loc_path = header_info.location; + header_info.location = NULL; } if ((use_ssl && resource->port != 443) || (!use_ssl && resource->port != 80)) { - snprintf(new_path, sizeof(new_path) - 1, "%s://%s:%d%s", ZSTR_VAL(resource->scheme), ZSTR_VAL(resource->host), resource->port, loc_path); + spprintf(&new_path, 0, "%s://%s:%d%s", ZSTR_VAL(resource->scheme), + ZSTR_VAL(resource->host), resource->port, loc_path); } else { - snprintf(new_path, sizeof(new_path) - 1, "%s://%s%s", ZSTR_VAL(resource->scheme), ZSTR_VAL(resource->host), loc_path); + spprintf(&new_path, 0, "%s://%s%s", ZSTR_VAL(resource->scheme), + ZSTR_VAL(resource->host), loc_path); } + efree(loc_path); } else { - strlcpy(new_path, header_info.location, sizeof(new_path)); + new_path = header_info.location; + header_info.location = NULL; } php_url_free(resource); /* check for invalid redirection URLs */ if ((resource = php_url_parse(new_path)) == NULL) { php_stream_wrapper_log_error(wrapper, options, "Invalid redirect URL! %s", new_path); + efree(new_path); goto out; } @@ -1069,6 +1086,7 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, while (s < e) { \ if (iscntrl(*s)) { \ php_stream_wrapper_log_error(wrapper, options, "Invalid redirect URL! %s", new_path); \ + efree(new_path); \ goto out; \ } \ s++; \ @@ -1091,6 +1109,7 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, stream = php_stream_url_wrap_http_ex( wrapper, new_path, mode, options, opened_path, context, --redirect_max, new_flags, response_header STREAMS_CC); + efree(new_path); } else { php_stream_wrapper_log_error(wrapper, options, "HTTP request failed! %s", tmp_line); } @@ -1103,6 +1122,10 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, efree(http_header_line); } + if (header_info.location != NULL) { + efree(header_info.location); + } + if (resource) { php_url_free(resource); } diff --git a/ext/standard/tests/http/ghsa-52jp-hrpf-2jff-001.phpt b/ext/standard/tests/http/ghsa-52jp-hrpf-2jff-001.phpt new file mode 100644 index 0000000000000..744cff9cc72f2 --- /dev/null +++ b/ext/standard/tests/http/ghsa-52jp-hrpf-2jff-001.phpt @@ -0,0 +1,58 @@ +--TEST-- +GHSA-52jp-hrpf-2jff: HTTP stream wrapper truncate redirect location to 1024 bytes (success) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + $loc = str_repeat("y", 8000); + fwrite($conn, "HTTP/1.0 301 Ok\r\nContent-Type: text/html;\r\nLocation: $loc\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + case STREAM_NOTIFY_REDIRECTED: + echo "Redirected: "; + var_dump($message); + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(trim(file_get_contents("http://{{ ADDR }}", false, $ctx))); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +Found the mime-type: text/html; +Redirected: string(8000) "%s" + +Warning: file_get_contents(http://127.0.0.1:%d): Failed to open stream: %s +string(0) "" +array(3) { + [0]=> + string(15) "HTTP/1.0 301 Ok" + [1]=> + string(24) "Content-Type: text/html;" + [2]=> + string(8010) "Location: %s" +} diff --git a/ext/standard/tests/http/ghsa-52jp-hrpf-2jff-002.phpt b/ext/standard/tests/http/ghsa-52jp-hrpf-2jff-002.phpt new file mode 100644 index 0000000000000..bc71fd4e41167 --- /dev/null +++ b/ext/standard/tests/http/ghsa-52jp-hrpf-2jff-002.phpt @@ -0,0 +1,55 @@ +--TEST-- +GHSA-52jp-hrpf-2jff: HTTP stream wrapper truncate redirect location to 1024 bytes (over limit) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + $loc = str_repeat("y", 9000); + fwrite($conn, "HTTP/1.0 301 Ok\r\nContent-Type: text/html;\r\nLocation: $loc\r\n\r\nbody\r\n"); +CODE; + +$clientCode = <<<'CODE' + function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { + switch($notification_code) { + case STREAM_NOTIFY_MIME_TYPE_IS: + echo "Found the mime-type: ", $message, PHP_EOL; + break; + case STREAM_NOTIFY_REDIRECTED: + echo "Redirected: "; + var_dump($message); + } + } + + $ctx = stream_context_create(); + stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); + var_dump(trim(file_get_contents("http://{{ ADDR }}", false, $ctx))); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +Found the mime-type: text/html; + +Warning: file_get_contents(http://127.0.0.1:%d): Failed to open stream: HTTP Location header size is over the limit of 8182 bytes in %s +string(0) "" +array(2) { + [0]=> + string(15) "HTTP/1.0 301 Ok" + [1]=> + string(24) "Content-Type: text/html;" +} From 41d49abbd99dab06cdae4834db664435f8177174 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 14 Feb 2025 19:17:22 +0100 Subject: [PATCH 27/65] Fix GHSA-hgf5-96fm-v528: http user header check of crlf --- ext/standard/http_fopen_wrapper.c | 2 +- .../tests/http/ghsa-hgf5-96fm-v528-001.phpt | 65 +++++++++++++++++++ .../tests/http/ghsa-hgf5-96fm-v528-002.phpt | 62 ++++++++++++++++++ .../tests/http/ghsa-hgf5-96fm-v528-003.phpt | 64 ++++++++++++++++++ 4 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/http/ghsa-hgf5-96fm-v528-001.phpt create mode 100644 ext/standard/tests/http/ghsa-hgf5-96fm-v528-002.phpt create mode 100644 ext/standard/tests/http/ghsa-hgf5-96fm-v528-003.phpt diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index dbed175d06421..46169e9569e26 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -108,7 +108,7 @@ static inline void strip_header(char *header_bag, char *lc_header_bag, static bool check_has_header(const char *headers, const char *header) { const char *s = headers; while ((s = strstr(s, header))) { - if (s == headers || *(s-1) == '\n') { + if (s == headers || (*(s-1) == '\n' && *(s-2) == '\r')) { return 1; } s++; diff --git a/ext/standard/tests/http/ghsa-hgf5-96fm-v528-001.phpt b/ext/standard/tests/http/ghsa-hgf5-96fm-v528-001.phpt new file mode 100644 index 0000000000000..c40123560ef1e --- /dev/null +++ b/ext/standard/tests/http/ghsa-hgf5-96fm-v528-001.phpt @@ -0,0 +1,65 @@ +--TEST-- +GHSA-hgf5-96fm-v528: Stream HTTP wrapper header check might omit basic auth header (incorrect inside pos) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + $result = fread($conn, 1024); + $encoded_result = base64_encode($result); + + fwrite($conn, "HTTP/1.0 200 Ok\r\nContent-Type: text/html; charset=utf-8\r\n\r\n$encoded_result\r\n"); + +CODE; + +$clientCode = <<<'CODE' + $opts = [ + "http" => [ + "method" => "GET", + "header" => "Cookie: foo=bar\nauthorization:x\r\n" + ] + ]; + $ctx = stream_context_create($opts); + var_dump(explode("\r\n", base64_decode(file_get_contents("http://user:pwd@{{ ADDR }}", false, $ctx)))); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +array(7) { + [0]=> + string(14) "GET / HTTP/1.1" + [1]=> + string(33) "Authorization: Basic dXNlcjpwd2Q=" + [2]=> + string(21) "Host: 127.0.0.1:%d" + [3]=> + string(17) "Connection: close" + [4]=> + string(31) "Cookie: foo=bar +authorization:x" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +array(2) { + [0]=> + string(15) "HTTP/1.0 200 Ok" + [1]=> + string(38) "Content-Type: text/html; charset=utf-8" +} diff --git a/ext/standard/tests/http/ghsa-hgf5-96fm-v528-002.phpt b/ext/standard/tests/http/ghsa-hgf5-96fm-v528-002.phpt new file mode 100644 index 0000000000000..37a47df060a1c --- /dev/null +++ b/ext/standard/tests/http/ghsa-hgf5-96fm-v528-002.phpt @@ -0,0 +1,62 @@ +--TEST-- +GHSA-hgf5-96fm-v528: Header parser of http stream wrapper does not handle folded headers (correct start pos) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + $result = fread($conn, 1024); + $encoded_result = base64_encode($result); + + fwrite($conn, "HTTP/1.0 200 Ok\r\nContent-Type: text/html; charset=utf-8\r\n\r\n$encoded_result\r\n"); + +CODE; + +$clientCode = <<<'CODE' + $opts = [ + "http" => [ + "method" => "GET", + "header" => "Authorization: Bearer x\r\n" + ] + ]; + $ctx = stream_context_create($opts); + var_dump(explode("\r\n", base64_decode(file_get_contents("http://user:pwd@{{ ADDR }}", false, $ctx)))); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +array(6) { + [0]=> + string(14) "GET / HTTP/1.1" + [1]=> + string(21) "Host: 127.0.0.1:%d" + [2]=> + string(17) "Connection: close" + [3]=> + string(23) "Authorization: Bearer x" + [4]=> + string(0) "" + [5]=> + string(0) "" +} +array(2) { + [0]=> + string(15) "HTTP/1.0 200 Ok" + [1]=> + string(38) "Content-Type: text/html; charset=utf-8" +} diff --git a/ext/standard/tests/http/ghsa-hgf5-96fm-v528-003.phpt b/ext/standard/tests/http/ghsa-hgf5-96fm-v528-003.phpt new file mode 100644 index 0000000000000..6c84679ff63bd --- /dev/null +++ b/ext/standard/tests/http/ghsa-hgf5-96fm-v528-003.phpt @@ -0,0 +1,64 @@ +--TEST-- +GHSA-hgf5-96fm-v528: Header parser of http stream wrapper does not handle folded headers (correct middle pos) +--FILE-- + [ + "tcp_nodelay" => true + ] + ]); + + $server = stream_socket_server( + "tcp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt); + phpt_notify_server_start($server); + + $conn = stream_socket_accept($server); + + phpt_notify(message:"server-accepted"); + + $result = fread($conn, 1024); + $encoded_result = base64_encode($result); + + fwrite($conn, "HTTP/1.0 200 Ok\r\nContent-Type: text/html; charset=utf-8\r\n\r\n$encoded_result\r\n"); + +CODE; + +$clientCode = <<<'CODE' + $opts = [ + "http" => [ + "method" => "GET", + "header" => "Cookie: x=y\r\nAuthorization: Bearer x\r\n" + ] + ]; + $ctx = stream_context_create($opts); + var_dump(explode("\r\n", base64_decode(file_get_contents("http://user:pwd@{{ ADDR }}", false, $ctx)))); + var_dump($http_response_header); +CODE; + +include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__); +ServerClientTestCase::getInstance()->run($clientCode, $serverCode); +?> +--EXPECTF-- +array(7) { + [0]=> + string(14) "GET / HTTP/1.1" + [1]=> + string(21) "Host: 127.0.0.1:%d" + [2]=> + string(17) "Connection: close" + [3]=> + string(11) "Cookie: x=y" + [4]=> + string(23) "Authorization: Bearer x" + [5]=> + string(0) "" + [6]=> + string(0) "" +} +array(2) { + [0]=> + string(15) "HTTP/1.0 200 Ok" + [1]=> + string(38) "Content-Type: text/html; charset=utf-8" +} From b6004a043c16b211d462218fbb3f72db68ec2b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 20 Nov 2024 10:47:27 +0100 Subject: [PATCH 28/65] Fix GHSA-p3x9-6h7p-cgfc: libxml streams wrong `content-type` on redirect libxml streams use wrong content-type header when requesting a redirected resource. --- ext/dom/tests/ghsa-p3x9-6h7p-cgfc_001.phpt | 60 +++++++++++++++++ ext/dom/tests/ghsa-p3x9-6h7p-cgfc_002.phpt | 60 +++++++++++++++++ ext/dom/tests/ghsa-p3x9-6h7p-cgfc_003.phpt | 60 +++++++++++++++++ ext/libxml/libxml.c | 77 ++++++++++++---------- 4 files changed, 224 insertions(+), 33 deletions(-) create mode 100644 ext/dom/tests/ghsa-p3x9-6h7p-cgfc_001.phpt create mode 100644 ext/dom/tests/ghsa-p3x9-6h7p-cgfc_002.phpt create mode 100644 ext/dom/tests/ghsa-p3x9-6h7p-cgfc_003.phpt diff --git a/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_001.phpt b/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_001.phpt new file mode 100644 index 0000000000000..47212cb34100a --- /dev/null +++ b/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_001.phpt @@ -0,0 +1,60 @@ +--TEST-- +GHSA-p3x9-6h7p-cgfc: libxml streams use wrong `content-type` header when requesting a redirected resource (Basic) +--EXTENSIONS-- +dom +--SKIPIF-- + +--FILE-- + + + + GHSA-p3x9-6h7p-cgfc + + + + + + +

GHSA-p3x9-6h7p-cgfc

+ + + EOT; + // Intentionally using non-standard casing for content-type to verify it is matched not case sensitively. + yield "data://text/plain,HTTP/1.1 200 OK\r\nconteNt-tyPe: text/html; charset=utf-8\r\n\r\n{$xml}"; +} + +['pid' => $pid, 'uri' => $uri] = http_server('genResponses', $output); +$document = new \DOMDocument(); +$document->loadHTMLFile($uri); + +$h1 = $document->getElementsByTagName('h1'); +var_dump($h1->length); +var_dump($document->saveHTML()); +http_server_kill($pid); +?> +--EXPECT-- +int(1) +string(266) " + + + GHSA-p3x9-6h7p-cgfc + + + + + + +

GHSA-p3x9-6h7p-cgfc

+ + +" diff --git a/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_002.phpt b/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_002.phpt new file mode 100644 index 0000000000000..a7eff3b9a8b76 --- /dev/null +++ b/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_002.phpt @@ -0,0 +1,60 @@ +--TEST-- +GHSA-p3x9-6h7p-cgfc: libxml streams use wrong `content-type` header when requesting a redirected resource (Missing content-type) +--EXTENSIONS-- +dom +--SKIPIF-- + +--FILE-- + + + + GHSA-p3x9-6h7p-cgfc + + + + + + +

GHSA-p3x9-6h7p-cgfc

+ + + EOT; + // Missing content-type in actual response. + yield "data://text/plain,HTTP/1.1 200 OK\r\n\r\n{$xml}"; +} + +['pid' => $pid, 'uri' => $uri] = http_server('genResponses', $output); +$document = new \DOMDocument(); +$document->loadHTMLFile($uri); + +$h1 = $document->getElementsByTagName('h1'); +var_dump($h1->length); +var_dump($document->saveHTML()); +http_server_kill($pid); +?> +--EXPECT-- +int(1) +string(266) " + + + GHSA-p3x9-6h7p-cgfc + + + + + + +

GHSA-p3x9-6h7p-cgfc

+ + +" diff --git a/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_003.phpt b/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_003.phpt new file mode 100644 index 0000000000000..178b35f3525a5 --- /dev/null +++ b/ext/dom/tests/ghsa-p3x9-6h7p-cgfc_003.phpt @@ -0,0 +1,60 @@ +--TEST-- +GHSA-p3x9-6h7p-cgfc: libxml streams use wrong `content-type` header when requesting a redirected resource (Reason with colon) +--EXTENSIONS-- +dom +--SKIPIF-- + +--FILE-- + + + + GHSA-p3x9-6h7p-cgfc + + + + + + +

GHSA-p3x9-6h7p-cgfc

+ + + EOT; + // Missing content-type in actual response. + yield "data://text/plain,HTTP/1.1 200 OK: This is fine\r\n\r\n{$xml}"; +} + +['pid' => $pid, 'uri' => $uri] = http_server('genResponses', $output); +$document = new \DOMDocument(); +$document->loadHTMLFile($uri); + +$h1 = $document->getElementsByTagName('h1'); +var_dump($h1->length); +var_dump($document->saveHTML()); +http_server_kill($pid); +?> +--EXPECT-- +int(1) +string(266) " + + + GHSA-p3x9-6h7p-cgfc + + + + + + +

GHSA-p3x9-6h7p-cgfc

+ + +" diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index dc5e77909523d..3311346d4bcfb 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -374,42 +374,53 @@ php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc) if (Z_TYPE(s->wrapperdata) == IS_ARRAY) { zval *header; - ZEND_HASH_FOREACH_VAL_IND(Z_ARRVAL(s->wrapperdata), header) { + /* Scan backwards: The header array might contain the headers for multiple responses, if + * a redirect was followed. + */ + ZEND_HASH_REVERSE_FOREACH_VAL_IND(Z_ARRVAL(s->wrapperdata), header) { const char buf[] = "Content-Type:"; - if (Z_TYPE_P(header) == IS_STRING && - !zend_binary_strncasecmp(Z_STRVAL_P(header), Z_STRLEN_P(header), buf, sizeof(buf)-1, sizeof(buf)-1)) { - char *needle = estrdup("charset="); - char *haystack = estrndup(Z_STRVAL_P(header), Z_STRLEN_P(header)); - char *encoding = php_stristr(haystack, needle, Z_STRLEN_P(header), sizeof("charset=")-1); - - if (encoding) { - char *end; - - encoding += sizeof("charset=")-1; - if (*encoding == '"') { - encoding++; - } - end = strchr(encoding, ';'); - if (end == NULL) { - end = encoding + strlen(encoding); - } - end--; /* end == encoding-1 isn't a buffer underrun */ - while (*end == ' ' || *end == '\t') { - end--; - } - if (*end == '"') { - end--; - } - if (encoding >= end) continue; - *(end+1) = '\0'; - enc = xmlParseCharEncoding(encoding); - if (enc <= XML_CHAR_ENCODING_NONE) { - enc = XML_CHAR_ENCODING_NONE; + if (Z_TYPE_P(header) == IS_STRING) { + /* If no colon is found in the header, we assume it's the HTTP status line and bail out. */ + char *colon = memchr(Z_STRVAL_P(header), ':', Z_STRLEN_P(header)); + char *space = memchr(Z_STRVAL_P(header), ' ', Z_STRLEN_P(header)); + if (colon == NULL || space < colon) { + break; + } + + if (!zend_binary_strncasecmp(Z_STRVAL_P(header), Z_STRLEN_P(header), buf, sizeof(buf)-1, sizeof(buf)-1)) { + char *needle = estrdup("charset="); + char *haystack = estrndup(Z_STRVAL_P(header), Z_STRLEN_P(header)); + char *encoding = php_stristr(haystack, needle, Z_STRLEN_P(header), sizeof("charset=")-1); + + if (encoding) { + char *end; + + encoding += sizeof("charset=")-1; + if (*encoding == '"') { + encoding++; + } + end = strchr(encoding, ';'); + if (end == NULL) { + end = encoding + strlen(encoding); + } + end--; /* end == encoding-1 isn't a buffer underrun */ + while (*end == ' ' || *end == '\t') { + end--; + } + if (*end == '"') { + end--; + } + if (encoding >= end) continue; + *(end+1) = '\0'; + enc = xmlParseCharEncoding(encoding); + if (enc <= XML_CHAR_ENCODING_NONE) { + enc = XML_CHAR_ENCODING_NONE; + } } + efree(haystack); + efree(needle); + break; /* found content-type */ } - efree(haystack); - efree(needle); - break; /* found content-type */ } } ZEND_HASH_FOREACH_END(); } From 0e715e71d945b68f8ccedd62c5960df747af6625 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:44:05 +0100 Subject: [PATCH 29/65] Fix GHSA-wg4p-4hqh-c3g9 --- ext/xml/tests/toffset_bounds.phpt | 42 +++++++++++++++++++++++++++++++ ext/xml/xml.c | 12 ++++++--- 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 ext/xml/tests/toffset_bounds.phpt diff --git a/ext/xml/tests/toffset_bounds.phpt b/ext/xml/tests/toffset_bounds.phpt new file mode 100644 index 0000000000000..5a3fd22f86cd7 --- /dev/null +++ b/ext/xml/tests/toffset_bounds.phpt @@ -0,0 +1,42 @@ +--TEST-- +XML_OPTION_SKIP_TAGSTART bounds +--EXTENSIONS-- +xml +--FILE-- +"; +$parser = xml_parser_create(); +xml_parser_set_option($parser, XML_OPTION_SKIP_TAGSTART, 100); +$res = xml_parse_into_struct($parser,$sample,$vals,$index); +var_dump($vals); +?> +--EXPECT-- +array(3) { + [0]=> + array(3) { + ["tag"]=> + string(0) "" + ["type"]=> + string(4) "open" + ["level"]=> + int(1) + } + [1]=> + array(3) { + ["tag"]=> + string(0) "" + ["type"]=> + string(8) "complete" + ["level"]=> + int(2) + } + [2]=> + array(3) { + ["tag"]=> + string(0) "" + ["type"]=> + string(5) "close" + ["level"]=> + int(1) + } +} diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 56f81c4305b4f..1638f36e8ebc5 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -667,9 +667,11 @@ void _xml_startElementHandler(void *userData, const XML_Char *name, const XML_Ch array_init(&tag); array_init(&atr); - _xml_add_to_info(parser, ZSTR_VAL(tag_name) + parser->toffset); + char *skipped_tag_name = SKIP_TAGSTART(ZSTR_VAL(tag_name)); - add_assoc_string(&tag, "tag", SKIP_TAGSTART(ZSTR_VAL(tag_name))); /* cast to avoid gcc-warning */ + _xml_add_to_info(parser, skipped_tag_name); + + add_assoc_string(&tag, "tag", skipped_tag_name); add_assoc_string(&tag, "type", "open"); add_assoc_long(&tag, "level", parser->level); @@ -736,9 +738,11 @@ void _xml_endElementHandler(void *userData, const XML_Char *name) } else { array_init(&tag); - _xml_add_to_info(parser, ZSTR_VAL(tag_name) + parser->toffset); + char *skipped_tag_name = SKIP_TAGSTART(ZSTR_VAL(tag_name)); + + _xml_add_to_info(parser, skipped_tag_name); - add_assoc_string(&tag, "tag", SKIP_TAGSTART(ZSTR_VAL(tag_name))); /* cast to avoid gcc-warning */ + add_assoc_string(&tag, "tag", skipped_tag_name); add_assoc_string(&tag, "type", "close"); add_assoc_long(&tag, "level", parser->level); From 74d548bf58d878c99f83671986728b65cb5b07fc Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Fri, 7 Mar 2025 13:40:40 +0100 Subject: [PATCH 30/65] Update NEWS with entries for security fixes --- NEWS | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7324aaf5bef54..87a7e7d080c44 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,21 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.1.32 +13 Mar 2025, PHP 8.1.32 + +- LibXML: + . Fixed GHSA-wg4p-4hqh-c3g9 (Reocurrence of #72714). (nielsdos) + . Fixed GHSA-p3x9-6h7p-cgfc (libxml streams use wrong `content-type` header + when requesting a redirected resource). (CVE-2025-1219) (timwolla) + +- Streams: + . Fixed GHSA-hgf54-96fm-v528 (Stream HTTP wrapper header check might omit + basic auth header). (CVE-2025-1736) (Jakub Zelenka) + . Fixed GHSA-52jp-hrpf-2jff (Stream HTTP wrapper truncate redirect location + to 1024 bytes). (CVE-2025-1861) (Jakub Zelenka) + . Fixed GHSA-pcmh-g36c-qc44 (Streams HTTP wrapper does not fail for headers + without colon). (CVE-2025-1734) (Jakub Zelenka) + . Fixed GHSA-v8xr-gpvj-cx9g (Header parser of `http` stream wrapper does not + handle folded headers). (CVE-2025-1217) (Jakub Zelenka) - Windows: . Fixed phpize for Windows 11 (24H2). (bwoebi) From ef2c459941b5ffae501e5311f5ac2041aadbe461 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 13 Nov 2024 01:41:40 +0100 Subject: [PATCH 31/65] Use-after-free for ??= due to incorrect live-range calculation Fixes GHSA-rwp7-7vc6-8477 --- NEWS | 2 ++ Zend/tests/ghsa-rwp7-7vc6-8477_001.phpt | 26 +++++++++++++++++++++++++ Zend/tests/ghsa-rwp7-7vc6-8477_002.phpt | 24 +++++++++++++++++++++++ Zend/tests/ghsa-rwp7-7vc6-8477_003.phpt | 22 +++++++++++++++++++++ Zend/zend_opcode.c | 8 ++++++++ 5 files changed, 82 insertions(+) create mode 100644 Zend/tests/ghsa-rwp7-7vc6-8477_001.phpt create mode 100644 Zend/tests/ghsa-rwp7-7vc6-8477_002.phpt create mode 100644 Zend/tests/ghsa-rwp7-7vc6-8477_003.phpt diff --git a/NEWS b/NEWS index 07effa01580c8..aeffd4ece47dc 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,8 @@ PHP NEWS `__callStatic` is allowed). (timwolla) . Fixed bug GH-17797 (zend_test_compile_string crash on invalid script path). (David Carlier) + . Fixed GHSA-rwp7-7vc6-8477 (Reference counting in php_request_shutdown + causes Use-After-Free). (CVE-2024-11235) (ilutov) - DOM: . Fixed bug GH-17847 (xinclude destroys live node). (nielsdos) diff --git a/Zend/tests/ghsa-rwp7-7vc6-8477_001.phpt b/Zend/tests/ghsa-rwp7-7vc6-8477_001.phpt new file mode 100644 index 0000000000000..d0e9ddcba410b --- /dev/null +++ b/Zend/tests/ghsa-rwp7-7vc6-8477_001.phpt @@ -0,0 +1,26 @@ +--TEST-- +GHSA-rwp7-7vc6-8477: Use-after-free for ??= due to incorrect live-range calculation +--FILE-- +foo()->baz ??= 1; +} catch (Exception $e) { + echo $e->getMessage(); +} + +?> +--EXPECT-- +Hello diff --git a/Zend/tests/ghsa-rwp7-7vc6-8477_002.phpt b/Zend/tests/ghsa-rwp7-7vc6-8477_002.phpt new file mode 100644 index 0000000000000..4115d9eae26fd --- /dev/null +++ b/Zend/tests/ghsa-rwp7-7vc6-8477_002.phpt @@ -0,0 +1,24 @@ +--TEST-- +GHSA-rwp7-7vc6-8477: Use-after-free for ??= due to incorrect live-range calculation +--FILE-- +foo()->prop ??= 'foo'; +} catch (Error $e) { + echo $e->getMessage(); +} + +?> +--EXPECT-- +Cannot assign string to property Foo::$prop of type int diff --git a/Zend/tests/ghsa-rwp7-7vc6-8477_003.phpt b/Zend/tests/ghsa-rwp7-7vc6-8477_003.phpt new file mode 100644 index 0000000000000..f2808afbf84de --- /dev/null +++ b/Zend/tests/ghsa-rwp7-7vc6-8477_003.phpt @@ -0,0 +1,22 @@ +--TEST-- +GHSA-rwp7-7vc6-8477: Use-after-free for ??= due to incorrect live-range calculation +--FILE-- +prop ??= 'foo'; +} catch (Error $e) { + echo $e->getMessage(); +} + +?> +--EXPECT-- +Cannot assign string to property Foo::$prop of type int diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 55bf81376d99d..06f411a1d3663 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -922,6 +922,14 @@ static void zend_calc_live_ranges( opnum--; opline--; + /* SEPARATE always redeclares its op1. For the purposes of live-ranges, + * its declaration is irrelevant. Don't terminate the current live-range + * to avoid breaking special handling of COPY_TMP. */ + if (opline->opcode == ZEND_SEPARATE) { + ZEND_ASSERT(opline->op1.var == opline->result.var); + continue; + } + if ((opline->result_type & (IS_TMP_VAR|IS_VAR)) && !is_fake_def(opline)) { uint32_t var_num = EX_VAR_TO_NUM(opline->result.var) - var_offset; /* Defs without uses can occur for two reasons: Either because the result is From 858c378930eb4172b94528e80c95058207469a04 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Tue, 11 Mar 2025 16:34:23 -0500 Subject: [PATCH 32/65] PHP-8.1 is now for PHP 8.1.33-dev --- NEWS | 4 ++++ Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 87a7e7d080c44..67f6b8f728be7 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +?? ??? ????, PHP 8.1.33 + + + 13 Mar 2025, PHP 8.1.32 - LibXML: diff --git a/Zend/zend.h b/Zend/zend.h index dcf69979f952c..6562119e8363c 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.1.31-dev" +#define ZEND_VERSION "4.1.33-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index f6902707abb15..0f45db92ba7de 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.1.31-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.1.33-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index bff6722583474..2aee6f19d16a4 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 1 -#define PHP_RELEASE_VERSION 31 +#define PHP_RELEASE_VERSION 33 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.1.31-dev" -#define PHP_VERSION_ID 80131 +#define PHP_VERSION "8.1.33-dev" +#define PHP_VERSION_ID 80133 From b617b0832ccdb25fad861091564fee077f5983fb Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Tue, 11 Mar 2025 18:31:23 -0400 Subject: [PATCH 33/65] PHP-8.2 is now for PHP 8.2.29-dev --- NEWS | 4 +++- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index f2f685e6f6cfc..a6429585cf2fb 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.2.28 +?? ??? ????, PHP 8.2.29 + +13 Mar 2025, PHP 8.2.28 - Core: . Fixed bug GH-17211 (observer segfault on function loaded with dl()). diff --git a/Zend/zend.h b/Zend/zend.h index 7deb59f432199..71e5908f334f0 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.2.28-dev" +#define ZEND_VERSION "4.2.29-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 4d63418347ef3..c70ce436721a8 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.2.28-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.2.29-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index d035df8c52919..cd9671425f86f 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 2 -#define PHP_RELEASE_VERSION 28 +#define PHP_RELEASE_VERSION 29 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.2.28-dev" -#define PHP_VERSION_ID 80228 +#define PHP_VERSION "8.2.29-dev" +#define PHP_VERSION_ID 80229 From 009b5e2bfd497c3abdd645ec60bbdb90787de6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 16 Dec 2024 22:16:18 +0100 Subject: [PATCH 34/65] fix GH-8533: dynamic libphp linking on Mac Pass the -dynamiclib flag to libtool to build a valid Mac dylib. Closes GH-8533. --- .gitignore | 3 +++ NEWS | 3 +++ build/Makefile.global | 4 ++++ build/php.m4 | 9 +++++++++ sapi/embed/config.m4 | 5 ++++- 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b9e60cc6b5bde..4e95d9a9da33d 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,9 @@ # Libtool library files generated during build process *.la +# Mac shared library files generated during build process +*.dylib + # Directories created by Libtool for storing generated library files .libs/ diff --git a/NEWS b/NEWS index aeffd4ece47dc..c54938982f5fa 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ PHP NEWS . Fixed bug GH-17984 (calls with arguments as array with references). (David Carlier) +- Embed: + . Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas) + - Mbstring: . Fixed bug GH-17989 (mb_output_handler crash with unset http_output_conv_mimetypes). (nielsdos) diff --git a/build/Makefile.global b/build/Makefile.global index b11ce20aae87a..ec19efcbc5894 100644 --- a/build/Makefile.global +++ b/build/Makefile.global @@ -19,6 +19,10 @@ libphp.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(LIBTOOL) --tag=CC --mode=link $(CC) $(LIBPHP_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ -@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 +libphp.dylib: libphp.la + $(LIBTOOL) --tag=CC --mode=link $(CC) -dynamiclib $(LIBPHP_CFLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -rpath $(phptempdir) -install_name @rpath/$@ $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ + -@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 + libs/libphp.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp.so diff --git a/build/php.m4 b/build/php.m4 index 61ee5c167536b..142ddf08fd98b 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -764,6 +764,14 @@ AC_DEFUN([PHP_BUILD_SHARED],[ php_lo=$shared_lo ]) +dnl +dnl PHP_BUILD_SHARED_DYLIB +dnl +AC_DEFUN([PHP_BUILD_SHARED_DYLIB],[ + PHP_BUILD_SHARED + OVERALL_TARGET=libphp.dylib +]) + dnl dnl PHP_BUILD_STATIC dnl @@ -876,6 +884,7 @@ AC_DEFUN([PHP_SELECT_SAPI],[ case "$2" in static[)] PHP_BUILD_STATIC;; shared[)] PHP_BUILD_SHARED;; + shared-dylib[)] PHP_BUILD_SHARED_DYLIB;; bundle[)] PHP_BUILD_BUNDLE;; esac install_sapi="install-sapi" diff --git a/sapi/embed/config.m4 b/sapi/embed/config.m4 index 39d7dcf0a3ff2..71aab64e6fa52 100644 --- a/sapi/embed/config.m4 +++ b/sapi/embed/config.m4 @@ -11,7 +11,10 @@ if test "$PHP_EMBED" != "no"; then case "$PHP_EMBED" in yes|shared) LIBPHP_CFLAGS="-shared" - PHP_EMBED_TYPE=shared + AS_CASE(["$host_alias"], [*darwin*], [ + SAPI_SHARED="libs/libphp.dylib" + PHP_EMBED_TYPE=shared-dylib + ], [PHP_EMBED_TYPE=shared]) INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib" ;; static) From 517d7d909da6f9773c543cf682ea71e67a3b4d66 Mon Sep 17 00:00:00 2001 From: Eric Mann Date: Wed, 12 Mar 2025 06:34:55 -0700 Subject: [PATCH 35/65] PHP-8.3 is now for PHP-8.3.20-dev --- NEWS | 4 ++-- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index c54938982f5fa..e899b8ac86ce8 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.3.19 +?? ??? ????, PHP 8.3.20 - DOM: . Fix weird unpack behaviour in DOM. (nielsdos) @@ -19,7 +19,7 @@ PHP NEWS - Treewide: . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos) -27 Feb 2025, PHP 8.3.18 +13 Feb 2025, PHP 8.3.19 - BCMath: . Fixed bug GH-17398 (bcmul memory leak). (SakiTakamachi) diff --git a/Zend/zend.h b/Zend/zend.h index e795ac967a23d..927088ea18706 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.3.19-dev" +#define ZEND_VERSION "4.3.20-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 0e98613854281..a94d4958492fd 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.3.19-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.3.20-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 8b508aaa33585..3dee6de933251 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 3 -#define PHP_RELEASE_VERSION 19 +#define PHP_RELEASE_VERSION 20 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.3.19-dev" -#define PHP_VERSION_ID 80319 +#define PHP_VERSION "8.3.20-dev" +#define PHP_VERSION_ID 80320 From c3fc94c4b8570509065c49df67436597afd94bc5 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 12 Mar 2025 20:07:34 +0000 Subject: [PATCH 36/65] ext/intl: fix locale_compose/locale_lookup to be able to deal with references. close GH-18035 --- NEWS | 4 +++ ext/intl/locale/locale_methods.c | 8 +++-- .../locale_compose_lookup_references.phpt | 29 +++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 ext/intl/tests/locale_compose_lookup_references.phpt diff --git a/NEWS b/NEWS index e899b8ac86ce8..39ee4c46becda 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ PHP NEWS . Fixed bug GH-17984 (calls with arguments as array with references). (David Carlier) +- Intl: + . Fix locale_compose and locale_lookup to work with their array argument + with values as references. (David Carlier) + - Embed: . Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas) diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index d6053b6be56d3..f810a61b6be12 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -814,7 +814,7 @@ static int append_key_value(smart_str* loc_name, HashTable* hash_arr, char* key_ { zval *ele_value; - if ((ele_value = zend_hash_str_find(hash_arr , key_name, strlen(key_name))) != NULL ) { + if ((ele_value = zend_hash_str_find_deref(hash_arr , key_name, strlen(key_name))) != NULL ) { if(Z_TYPE_P(ele_value)!= IS_STRING ){ /* element value is not a string */ return FAILURE; @@ -857,7 +857,7 @@ static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr, int isFirstSubtag = 0; /* Variant/ Extlang/Private etc. */ - if ((ele_value = zend_hash_str_find( hash_arr , key_name , strlen(key_name))) != NULL) { + if ((ele_value = zend_hash_str_find_deref( hash_arr , key_name , strlen(key_name))) != NULL) { if( Z_TYPE_P(ele_value) == IS_STRING ){ add_prefix( loc_name , key_name); @@ -869,6 +869,7 @@ static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr, zval *data; ZEND_HASH_FOREACH_VAL(arr, data) { + ZVAL_DEREF(data); if(Z_TYPE_P(data) != IS_STRING) { return FAILURE; } @@ -900,7 +901,7 @@ static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr, isFirstSubtag = 0; for( i=0 ; i< max_value; i++ ){ snprintf( cur_key_name , 30, "%s%d", key_name , i); - if ((ele_value = zend_hash_str_find( hash_arr , cur_key_name , strlen(cur_key_name))) != NULL) { + if ((ele_value = zend_hash_str_find_deref( hash_arr , cur_key_name , strlen(cur_key_name))) != NULL) { if( Z_TYPE_P(ele_value)!= IS_STRING ){ /* variant is not a string */ return FAILURE; @@ -1437,6 +1438,7 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr, char **cur_arr = ecalloc(zend_hash_num_elements(hash_arr)*2, sizeof(char *)); ZEND_HASH_FOREACH_VAL(hash_arr, ele_value) { + ZVAL_DEREF(ele_value); /* convert the array to lowercase , also replace hyphens with the underscore and store it in cur_arr */ if(Z_TYPE_P(ele_value)!= IS_STRING) { /* element value is not a string */ diff --git a/ext/intl/tests/locale_compose_lookup_references.phpt b/ext/intl/tests/locale_compose_lookup_references.phpt new file mode 100644 index 0000000000000..f6a202f7512fa --- /dev/null +++ b/ext/intl/tests/locale_compose_lookup_references.phpt @@ -0,0 +1,29 @@ +--TEST-- +locale_compose()/locale_lookup() with values as references. +--EXTENSIONS-- +intl +--FILE-- + 'en', Locale::REGION_TAG => &$en]; + +var_dump(locale_compose($data)); + +$data = [ + 'language' => 'de', + 'script' => 'Hans', + 'region' => 'DE', + 'variant2' => 'fr', + 'variant1' => &$en, + 'private1' => 'private1', + 'private2' => 'private2', + ]; +var_dump(locale_compose($data)); +$data = ['de', &$en]; +var_dump(locale_lookup($data, "en", false, "en")); +?> +--EXPECT-- +string(5) "en_en" +string(36) "de_Hans_DE_en_fr_x_private1_private2" +string(2) "en" From 69480be12afb4040c6dd9275b7836231cdd6f6bb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 12 Mar 2025 07:48:05 +0100 Subject: [PATCH 37/65] Relax test expectation for pcre2lib 10.45 Using e92848789acd8aa5cf32fedb519ba9378ac64e02 Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com> --- ext/pcre/tests/bug75457.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pcre/tests/bug75457.phpt b/ext/pcre/tests/bug75457.phpt index ee5ab162f8a6c..1401b25ff6fb7 100644 --- a/ext/pcre/tests/bug75457.phpt +++ b/ext/pcre/tests/bug75457.phpt @@ -6,5 +6,5 @@ $pattern = "/(((?(?C)0?=))(?!()0|.(?0)0)())/"; var_dump(preg_match($pattern, "hello")); ?> --EXPECTF-- -Warning: preg_match(): Compilation failed: assertion expected after (?( or (?(?C) at offset 8 in %sbug75457.php on line %d +Warning: preg_match(): Compilation failed:%r( atomic|)%r assertion expected after (?( or (?(?C) at offset 8 in %sbug75457.php on line %d bool(false) From 00ebd2d7f25c521a10feae6c8217f6be0825f84d Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 13 Mar 2025 13:01:53 +0100 Subject: [PATCH 38/65] Fix flaky connection count in mysqli test Use connection ID instead of count to check whether we're using a persistent connection. This allows the test to be run in parallel with the other tests, but also protects against the possibility that some other service connects to the mysql server. Closes GH-18040 --- ext/mysqli/tests/bug73462.phpt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ext/mysqli/tests/bug73462.phpt b/ext/mysqli/tests/bug73462.phpt index c4d68ca4f5935..318b8dd24b34d 100644 --- a/ext/mysqli/tests/bug73462.phpt +++ b/ext/mysqli/tests/bug73462.phpt @@ -5,13 +5,6 @@ mysqli --SKIPIF-- --FILE-- query("SHOW STATUS LIKE 'Connections'"); + $result = $mysql_1->query("SELECT CONNECTION_ID()"); $c1 = $result->fetch_row(); $result->free(); $mysql_1->close(); @@ -35,7 +28,7 @@ if (gethostname() == "php-ci-ppc64be") { /* Re-use persistent connection */ $mysql_3 = new mysqli('p:'.$host, $user, $passwd, $db, $port); $error = mysqli_connect_errno(); - $result = $mysql_3->query("SHOW STATUS LIKE 'Connections'"); + $result = $mysql_3->query("SELECT CONNECTION_ID()"); $c3 = $result->fetch_row(); $result->free(); $mysql_3->close(); From 54f93f127ee93e43233c1620e19a20414283f94d Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Thu, 13 Mar 2025 13:14:37 -0400 Subject: [PATCH 39/65] [skip ci] Fix release date of 8.3.19 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 39ee4c46becda..defd19e93f4ee 100644 --- a/NEWS +++ b/NEWS @@ -23,7 +23,7 @@ PHP NEWS - Treewide: . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos) -13 Feb 2025, PHP 8.3.19 +13 Mar 2025, PHP 8.3.19 - BCMath: . Fixed bug GH-17398 (bcmul memory leak). (SakiTakamachi) From c62523666c9fef743d34f2adc1d6c7de479e4870 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Thu, 13 Mar 2025 13:45:08 -0400 Subject: [PATCH 40/65] [skip ci] Fix invalid release date of 8.1.1 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 67f6b8f728be7..f34fc5c90e5de 100644 --- a/NEWS +++ b/NEWS @@ -1590,7 +1590,7 @@ PHP NEWS . Fixed bug GH-7815 (php_uname doesn't recognise latest Windows versions). (David Warner) -02 Dec 2021, PHP 8.1.1 +16 Dec 2021, PHP 8.1.1 - IMAP: . Fixed bug #81649 (imap_(un)delete accept sequences, not single numbers). From 200342145410e71654e2327e80febfd7d9c93483 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Thu, 13 Mar 2025 13:48:38 -0400 Subject: [PATCH 41/65] [skip ci] Fix release dates on NEWS --- NEWS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index defd19e93f4ee..4fa4fee3d849e 100644 --- a/NEWS +++ b/NEWS @@ -199,7 +199,7 @@ PHP NEWS . Fixed bug GH-17139 (Fix zip_entry_name() crash on invalid entry). (nielsdos) -02 Jan 2025, PHP 8.3.16 +16 Jan 2025, PHP 8.3.16 - Core: . Fixed bug GH-17106 (ZEND_MATCH_ERROR misoptimization). (ilutov) @@ -398,7 +398,7 @@ PHP NEWS - Windows: . Fixed bug GH-16849 (Error dialog causes process to hang). (cmb) -07 Nov 2024, PHP 8.3.14 +21 Nov 2024, PHP 8.3.14 - CLI: . Fixed bug GH-16373 (Shebang is not skipped for router script in cli-server @@ -919,7 +919,7 @@ PHP NEWS . Fixed bug GH-14834 (Error installing PHP when --with-pear is used). (nielsdos) -20 Jun 2024, PHP 8.3.9 +04 Jul 2024, PHP 8.3.9 - Core: . Fixed bug GH-14315 (Incompatible pointer type warnings). (Peter Kokot) @@ -1151,7 +1151,7 @@ PHP NEWS - Treewide: . Fix gcc-14 Wcalloc-transposed-args warnings. (Cristian Rodríguez) -28 Mar 2024, PHP 8.3.5 +11 Apr 2024, PHP 8.3.6 - Core: . Fixed GH-13569 (GC buffer unnecessarily grows up to GC_MAX_BUF_SIZE when @@ -1420,7 +1420,7 @@ PHP NEWS . Fixed bug GH-12980 (tidynode.props.attribute is missing "Boolean Attributes" and empty attributes). (nielsdos) -07 Dec 2023, PHP 8.3.1 +21 Dec 2023, PHP 8.3.1 - Core: . Fixed bug GH-12758 / GH-12768 (Invalid opline in OOM handlers within From 27affd8da173db7f7db5535c4caaf55d2986f925 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 12 Mar 2025 19:39:58 +0100 Subject: [PATCH 42/65] Fix GH-18018: RC1 data returned from offsetGet causes UAF in ArrayObject We should first check truthiness and only after that destroy the value. Closes GH-18034. --- NEWS | 4 ++++ ext/spl/spl_array.c | 6 ++++-- ext/spl/tests/gh18018.phpt | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ext/spl/tests/gh18018.phpt diff --git a/NEWS b/NEWS index 4fa4fee3d849e..58de3a7ed3cd8 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,10 @@ PHP NEWS . Fixed bug GH-17989 (mb_output_handler crash with unset http_output_conv_mimetypes). (nielsdos) +- SPL: + . Fixed bug GH-18018 (RC1 data returned from offsetGet causes UAF in + ArrayObject). (nielsdos) + - Treewide: . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos) diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index bd03a8aae0189..8d4541797a1c5 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -641,12 +641,14 @@ static bool spl_array_has_dimension_ex(bool check_inherited, zend_object *object } } + /* empty() check the value is not falsy, isset() only check it is not null */ + bool result = check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL; + if (value == &rv) { zval_ptr_dtor(&rv); } - /* empty() check the value is not falsy, isset() only check it is not null */ - return check_empty ? zend_is_true(value) : Z_TYPE_P(value) != IS_NULL; + return result; } /* }}} */ static int spl_array_has_dimension(zend_object *object, zval *offset, int check_empty) /* {{{ */ diff --git a/ext/spl/tests/gh18018.phpt b/ext/spl/tests/gh18018.phpt new file mode 100644 index 0000000000000..06fa7fc3d0e55 --- /dev/null +++ b/ext/spl/tests/gh18018.phpt @@ -0,0 +1,20 @@ +--TEST-- +GH-18018 (RC1 data returned from offsetGet causes UAF in ArrayObject) +--FILE-- + 1]; + +$object = new Crap($values); + +var_dump(empty($object['qux'])); +?> +--EXPECT-- +bool(false) From 70c2ebb69807d517fa38487e690462454c83f1ec Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Thu, 13 Mar 2025 22:24:49 +0100 Subject: [PATCH 43/65] Fix typo in GHSA-hgf5-96fm-v528 NEWS entry --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f34fc5c90e5de..29400e6ef5b5c 100644 --- a/NEWS +++ b/NEWS @@ -12,7 +12,7 @@ PHP NEWS when requesting a redirected resource). (CVE-2025-1219) (timwolla) - Streams: - . Fixed GHSA-hgf54-96fm-v528 (Stream HTTP wrapper header check might omit + . Fixed GHSA-hgf5-96fm-v528 (Stream HTTP wrapper header check might omit basic auth header). (CVE-2025-1736) (Jakub Zelenka) . Fixed GHSA-52jp-hrpf-2jff (Stream HTTP wrapper truncate redirect location to 1024 bytes). (CVE-2025-1861) (Jakub Zelenka) From a7d2703246cb4acdcb48ecb3682386a102702c43 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 13 Mar 2025 21:18:35 +0100 Subject: [PATCH 44/65] Correct check for maximum string length in JIT helpers This is a bit of a theoretical issue, but the maximum string length is actually ZSTR_MAX_LEN instead of SIZE_MAX. The resulting check is a bit slower but should still be relatively cheap. Closes GH-18049. --- ext/opcache/jit/zend_jit_helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index a79f2b5173d53..26e368dce6617 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1636,7 +1636,7 @@ static void ZEND_FASTCALL zend_jit_fast_assign_concat_helper(zval *op1, zval *op zend_string *result_str; uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(Z_STR_P(op1), Z_STR_P(op2)); - if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { + if (UNEXPECTED(op1_len > ZSTR_MAX_LEN - op2_len)) { zend_throw_error(NULL, "String size overflow"); return; } @@ -1672,7 +1672,7 @@ static void ZEND_FASTCALL zend_jit_fast_concat_helper(zval *result, zval *op1, z zend_string *result_str; uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(Z_STR_P(op1), Z_STR_P(op2)); - if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { + if (UNEXPECTED(op1_len > ZSTR_MAX_LEN - op2_len)) { zend_throw_error(NULL, "String size overflow"); return; } @@ -1696,7 +1696,7 @@ static void ZEND_FASTCALL zend_jit_fast_concat_tmp_helper(zval *result, zval *op zend_string *result_str; uint32_t flags = ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(Z_STR_P(op1), Z_STR_P(op2)); - if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) { + if (UNEXPECTED(op1_len > ZSTR_MAX_LEN - op2_len)) { zend_throw_error(NULL, "String size overflow"); return; } From 1c182674b09b88cb3ca954740504ba57aa1826ad Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Mon, 3 Mar 2025 13:12:21 +0100 Subject: [PATCH 45/65] Destroy temporary module classes in reverse order We destroy classes of dl()'ed modules in clean_module_classes(), during shutdown. Child classes of a module use structures of the parent class (such as inherited properties), which are destroyed earlier, so we have a use-after-free when destroying a child class. Here I destroy classes in reverse order, as it is done in zend_shutdown() for persistent classes. Fixes GH-17961 Fixes GH-15367 --- NEWS | 6 ++++ Zend/zend_API.c | 23 ++++++-------- ext/dl_test/dl_test.c | 12 ++++++++ ext/dl_test/dl_test.stub.php | 12 ++++++++ ext/dl_test/dl_test_arginfo.h | 58 ++++++++++++++++++++++++++++++++++- 5 files changed, 97 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index a6e51761301b8..3f4b5aa2bc83a 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,12 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.20 +- Core: + . Fixed bug GH-17961 (use-after-free during dl()'ed module class destruction). + (Arnaud) + . Fixed bug GH-15367 (dl() of module with aliased class crashes in shutdown). + (Arnaud) + - DOM: . Fix weird unpack behaviour in DOM. (nielsdos) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 13c640a64dd51..47de6e7897546 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -22,6 +22,7 @@ #include "zend.h" #include "zend_execute.h" #include "zend_API.h" +#include "zend_hash.h" #include "zend_modules.h" #include "zend_extensions.h" #include "zend_constants.h" @@ -3111,21 +3112,17 @@ ZEND_API zend_result zend_get_module_started(const char *module_name) /* {{{ */ } /* }}} */ -static int clean_module_class(zval *el, void *arg) /* {{{ */ -{ - zend_class_entry *ce = (zend_class_entry *)Z_PTR_P(el); - int module_number = *(int *)arg; - if (ce->type == ZEND_INTERNAL_CLASS && ce->info.internal.module->module_number == module_number) { - return ZEND_HASH_APPLY_REMOVE; - } else { - return ZEND_HASH_APPLY_KEEP; - } -} -/* }}} */ - static void clean_module_classes(int module_number) /* {{{ */ { - zend_hash_apply_with_argument(EG(class_table), clean_module_class, (void *) &module_number); + /* Child classes may reuse structures from parent classes, so destroy in reverse order. */ + Bucket *bucket; + ZEND_HASH_REVERSE_FOREACH_BUCKET(EG(class_table), bucket) { + zend_class_entry *ce = Z_CE(bucket->val); + if (ce->type == ZEND_INTERNAL_CLASS && ce->info.internal.module->module_number == module_number) { + zend_hash_del_bucket(EG(class_table), bucket); + } + } ZEND_HASH_FOREACH_END(); + } /* }}} */ diff --git a/ext/dl_test/dl_test.c b/ext/dl_test/dl_test.c index 1121a96b9df8d..1176a874d6027 100644 --- a/ext/dl_test/dl_test.c +++ b/ext/dl_test/dl_test.c @@ -92,10 +92,22 @@ PHP_METHOD(DlTest, test) RETURN_STR(retval); } +PHP_METHOD(DlTestSuperClass, test) +{ + ZEND_PARSE_PARAMETERS_NONE(); + + RETURN_NULL(); +} + /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(dl_test) { + zend_class_entry *ce; + register_class_DlTest(); + ce = register_class_DlTestSuperClass(); + register_class_DlTestSubClass(ce); + register_class_DlTestAliasedClass(); /* Test backwards compatibility */ if (getenv("PHP_DL_TEST_USE_OLD_REGISTER_INI_ENTRIES")) { diff --git a/ext/dl_test/dl_test.stub.php b/ext/dl_test/dl_test.stub.php index cd8b3916bae2e..c2d8ff577780f 100644 --- a/ext/dl_test/dl_test.stub.php +++ b/ext/dl_test/dl_test.stub.php @@ -12,3 +12,15 @@ function dl_test_test2(string $str = ""): string {} class DlTest { public function test(string $str = ""): string {} } + +class DlTestSuperClass { + public int $a; + public function test(string $str = ""): string {} +} + +class DlTestSubClass extends DlTestSuperClass { +} + +/** @alias DlTestClassAlias */ +class DlTestAliasedClass { +} diff --git a/ext/dl_test/dl_test_arginfo.h b/ext/dl_test/dl_test_arginfo.h index 0618bbdb222ca..549ac220b58bc 100644 --- a/ext/dl_test/dl_test_arginfo.h +++ b/ext/dl_test/dl_test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 2dbacf5282b0f8e53923ac70495c2da43c7237e3 */ + * Stub hash: 0641a8eeff00e6c8083fe4a8639f970e3ba80db9 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dl_test_test1, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -10,10 +10,13 @@ ZEND_END_ARG_INFO() #define arginfo_class_DlTest_test arginfo_dl_test_test2 +#define arginfo_class_DlTestSuperClass_test arginfo_dl_test_test2 + ZEND_FUNCTION(dl_test_test1); ZEND_FUNCTION(dl_test_test2); ZEND_METHOD(DlTest, test); +ZEND_METHOD(DlTestSuperClass, test); static const zend_function_entry ext_functions[] = { @@ -28,6 +31,22 @@ static const zend_function_entry class_DlTest_methods[] = { ZEND_FE_END }; + +static const zend_function_entry class_DlTestSuperClass_methods[] = { + ZEND_ME(DlTestSuperClass, test, arginfo_class_DlTestSuperClass_test, ZEND_ACC_PUBLIC) + ZEND_FE_END +}; + + +static const zend_function_entry class_DlTestSubClass_methods[] = { + ZEND_FE_END +}; + + +static const zend_function_entry class_DlTestAliasedClass_methods[] = { + ZEND_FE_END +}; + static zend_class_entry *register_class_DlTest(void) { zend_class_entry ce, *class_entry; @@ -37,3 +56,40 @@ static zend_class_entry *register_class_DlTest(void) return class_entry; } + +static zend_class_entry *register_class_DlTestSuperClass(void) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DlTestSuperClass", class_DlTestSuperClass_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + + zval property_a_default_value; + ZVAL_UNDEF(&property_a_default_value); + zend_string *property_a_name = zend_string_init("a", sizeof("a") - 1, 1); + zend_declare_typed_property(class_entry, property_a_name, &property_a_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); + zend_string_release(property_a_name); + + return class_entry; +} + +static zend_class_entry *register_class_DlTestSubClass(zend_class_entry *class_entry_DlTestSuperClass) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DlTestSubClass", class_DlTestSubClass_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_DlTestSuperClass); + + return class_entry; +} + +static zend_class_entry *register_class_DlTestAliasedClass(void) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "DlTestAliasedClass", class_DlTestAliasedClass_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + zend_register_class_alias("DlTestClassAlias", class_entry); + + return class_entry; +} From f34859cb9050dc240f48015195bee731d0233764 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 13 Mar 2025 20:46:52 +0000 Subject: [PATCH 46/65] ext/intl: Fix dateformat_format when the time is an array of references. --- NEWS | 2 ++ ext/intl/dateformat/dateformat_format.c | 2 +- .../tests/dateformat_format_references.phpt | 23 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ext/intl/tests/dateformat_format_references.phpt diff --git a/NEWS b/NEWS index 3f4b5aa2bc83a..8f5c84781e5db 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ PHP NEWS - Intl: . Fix locale_compose and locale_lookup to work with their array argument with values as references. (David Carlier) + . Fix dateformat_format when the time is an array of references. + (David Carlier) - Embed: . Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas) diff --git a/ext/intl/dateformat/dateformat_format.c b/ext/intl/dateformat/dateformat_format.c index 9419469b4f609..928712934b15c 100644 --- a/ext/intl/dateformat/dateformat_format.c +++ b/ext/intl/dateformat/dateformat_format.c @@ -64,7 +64,7 @@ static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo, return result; } - if ((ele_value = zend_hash_str_find(hash_arr, key_name, strlen(key_name))) != NULL) { + if ((ele_value = zend_hash_str_find_deref(hash_arr, key_name, strlen(key_name))) != NULL) { if(Z_TYPE_P(ele_value) != IS_LONG) { spprintf(&message, 0, "datefmt_format: parameter array contains " "a non-integer element for key '%s'", key_name); diff --git a/ext/intl/tests/dateformat_format_references.phpt b/ext/intl/tests/dateformat_format_references.phpt new file mode 100644 index 0000000000000..da1a52955f121 --- /dev/null +++ b/ext/intl/tests/dateformat_format_references.phpt @@ -0,0 +1,23 @@ +--TEST-- +Fix dateformat_format() with array argument with values as references. +--SKIPIF-- + +--FILE-- + &$a , + 'tm_min' => 3, + 'tm_hour' => 19, + 'tm_mday' => 3, + 'tm_mon' => 3, + 'tm_year' => 105, +); +$fmt = datefmt_create('en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/New_York', IntlDateFormatter::GREGORIAN); +$formatted = datefmt_format($fmt , $localtime_arr); +var_dump($formatted); +?> +--EXPECTF-- +string(%d) "Sunday, April 3, 2005 at 7:03:24%aPM Eastern Daylight Time" From 005c7b57974ede27e2714a9bfca534d595985e58 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 14 Mar 2025 07:36:48 +0000 Subject: [PATCH 47/65] ext/intl: Fix Uconverter::transcode with substitutes as references. close GH-18059 --- NEWS | 1 + ext/intl/converter/converter.c | 4 ++-- .../uconverter_transcode_references.phpt | 22 +++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 ext/intl/tests/uconverter_transcode_references.phpt diff --git a/NEWS b/NEWS index 8f5c84781e5db..8c9400b4a66c3 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ PHP NEWS with values as references. (David Carlier) . Fix dateformat_format when the time is an array of references. (David Carlier) + . Fix UConverter::transcode with substitutes as references. (David Carlier) - Embed: . Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas) diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 75fbfbc8e8861..4342eabcaf9eb 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -749,13 +749,13 @@ PHP_METHOD(UConverter, transcode) { zval *tmpzval; if (U_SUCCESS(error) && - (tmpzval = zend_hash_str_find(Z_ARRVAL_P(options), "from_subst", sizeof("from_subst") - 1)) != NULL && + (tmpzval = zend_hash_str_find_deref(Z_ARRVAL_P(options), "from_subst", sizeof("from_subst") - 1)) != NULL && Z_TYPE_P(tmpzval) == IS_STRING) { error = U_ZERO_ERROR; ucnv_setSubstChars(src_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); } if (U_SUCCESS(error) && - (tmpzval = zend_hash_str_find(Z_ARRVAL_P(options), "to_subst", sizeof("to_subst") - 1)) != NULL && + (tmpzval = zend_hash_str_find_deref(Z_ARRVAL_P(options), "to_subst", sizeof("to_subst") - 1)) != NULL && Z_TYPE_P(tmpzval) == IS_STRING) { error = U_ZERO_ERROR; ucnv_setSubstChars(dest_cnv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval) & 0x7F, &error); diff --git a/ext/intl/tests/uconverter_transcode_references.phpt b/ext/intl/tests/uconverter_transcode_references.phpt new file mode 100644 index 0000000000000..a2b1be20d1dfe --- /dev/null +++ b/ext/intl/tests/uconverter_transcode_references.phpt @@ -0,0 +1,22 @@ +--TEST-- +UConverter::transcode issue with substitutes values as references +--EXTENSIONS-- +intl +--FILE-- + '?', 'to_subst' => &$subst); +var_dump(UConverter::transcode("This is an ascii string", 'ascii', 'utf-8', $opts)); +$opts = array('from_subst' => &$subst, 'to_subst' => '?'); +var_dump(UConverter::transcode("This is an ascii string", 'ascii', 'utf-8', $opts)); +// should yield the same results +$opts = array('from_subst' => '?', 'to_subst' => '??'); +var_dump(UConverter::transcode("This is an ascii string", 'ascii', 'utf-8', $opts)); +$opts = array('from_subst' => '??', 'to_subst' => '?'); +var_dump(UConverter::transcode("This is an ascii string", 'ascii', 'utf-8', $opts)); +?> +--EXPECT-- +bool(false) +string(23) "This is an ascii string" +bool(false) +string(23) "This is an ascii string" From 38e553e4182437111432841651cca1c6ce2a8632 Mon Sep 17 00:00:00 2001 From: Katherine456719 Date: Sat, 15 Mar 2025 23:24:06 +0200 Subject: [PATCH 48/65] Fix GH-18082: Memory leaks in fuzzer SAPI error paths Closes GH-18081. --- NEWS | 4 ++++ sapi/fuzzer/fuzzer-json.c | 11 +++++------ sapi/fuzzer/fuzzer-mbregex.c | 9 +++++---- sapi/fuzzer/fuzzer-unserialize.c | 7 ++++--- sapi/fuzzer/fuzzer-unserializehash.c | 8 ++++---- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/NEWS b/NEWS index 8c9400b4a66c3..59b66e85f84f9 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,10 @@ PHP NEWS - Embed: . Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas) +- Fuzzer: + . Fixed bug GH-18081 (Memory leaks in error paths of fuzzer SAPI). + (Lung-Alexandra) + - Mbstring: . Fixed bug GH-17989 (mb_output_handler crash with unset http_output_conv_mimetypes). (nielsdos) diff --git a/sapi/fuzzer/fuzzer-json.c b/sapi/fuzzer/fuzzer-json.c index 4335598bc3caa..f5c00d77d9942 100644 --- a/sapi/fuzzer/fuzzer-json.c +++ b/sapi/fuzzer/fuzzer-json.c @@ -15,8 +15,6 @@ +----------------------------------------------------------------------+ */ - - #include "fuzzer.h" #include "Zend/zend.h" @@ -31,14 +29,15 @@ #include "ext/json/php_json_parser.h" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { - char *data = malloc(Size+1); - memcpy(data, Data, Size); - data[Size] = '\0'; - if (fuzzer_request_startup() == FAILURE) { + if (fuzzer_request_startup() == FAILURE){ return 0; } + char *data = malloc(Size + 1); + memcpy(data, Data, Size); + data[Size] = '\0'; + for (int option = 0; option <=1; ++option) { zval result; php_json_parser parser; diff --git a/sapi/fuzzer/fuzzer-mbregex.c b/sapi/fuzzer/fuzzer-mbregex.c index 970a7b5baeedb..afcd2b5c1ba7e 100644 --- a/sapi/fuzzer/fuzzer-mbregex.c +++ b/sapi/fuzzer/fuzzer-mbregex.c @@ -30,15 +30,16 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { #ifdef HAVE_MBREGEX - char *args[2]; - char *data = malloc(Size+1); - memcpy(data, Data, Size); - data[Size] = '\0'; if (fuzzer_request_startup() == FAILURE) { return 0; } + char *args[2]; + char *data = malloc(Size+1); + memcpy(data, Data, Size); + data[Size] = '\0'; + fuzzer_setup_dummy_frame(); args[0] = data; diff --git a/sapi/fuzzer/fuzzer-unserialize.c b/sapi/fuzzer/fuzzer-unserialize.c index ff26e5b1e8da3..d58b35ca32bd1 100644 --- a/sapi/fuzzer/fuzzer-unserialize.c +++ b/sapi/fuzzer/fuzzer-unserialize.c @@ -30,14 +30,15 @@ #include "ext/standard/php_var.h" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { - unsigned char *orig_data = malloc(Size+1); - memcpy(orig_data, Data, Size); - orig_data[Size] = '\0'; if (fuzzer_request_startup() == FAILURE) { return 0; } + unsigned char *orig_data = malloc(Size+1); + memcpy(orig_data, Data, Size); + orig_data[Size] = '\0'; + fuzzer_setup_dummy_frame(); { diff --git a/sapi/fuzzer/fuzzer-unserializehash.c b/sapi/fuzzer/fuzzer-unserializehash.c index 5d29eb5fb8c61..03c64dcbca017 100644 --- a/sapi/fuzzer/fuzzer-unserializehash.c +++ b/sapi/fuzzer/fuzzer-unserializehash.c @@ -34,15 +34,15 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t FullSize) { } ++Start; + if (fuzzer_request_startup() == FAILURE) { + return 0; + } + size_t Size = (Data + FullSize) - Start; unsigned char *orig_data = malloc(Size+1); memcpy(orig_data, Start, Size); orig_data[Size] = '\0'; - if (fuzzer_request_startup() == FAILURE) { - return 0; - } - fuzzer_setup_dummy_frame(); { From bd7d3c38ad2e7f67e24014fc5651471ce29487a7 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Mon, 17 Mar 2025 14:49:22 +0100 Subject: [PATCH 49/65] Get rid of atime change testing in bug72666_variation3.phpt --- ext/standard/tests/file/bug72666_variation3.phpt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ext/standard/tests/file/bug72666_variation3.phpt b/ext/standard/tests/file/bug72666_variation3.phpt index a491640c4f746..7937bd904ad7d 100644 --- a/ext/standard/tests/file/bug72666_variation3.phpt +++ b/ext/standard/tests/file/bug72666_variation3.phpt @@ -5,23 +5,11 @@ Bug #72666 (stat cache clearing inconsistent - plain wrapper) $filename = __DIR__ . '/bug72666_variation3.txt'; file_put_contents($filename, "test"); -$fd = fopen($filename, "r"); -$atime1 = fileatime($filename); -sleep(1); -var_dump(fread($fd, 4)); -$atime2 = fileatime($filename); $mtime1 = filemtime($filename); -fclose($fd); $fd = fopen($filename, "w"); sleep(1); var_dump(fwrite($fd, "data")); $mtime2 = filemtime($filename); -if (substr(PHP_OS, 0, 3) == 'WIN') { - // Windows do not hundle atime - var_dump($atime2 == $atime1); -} else { - var_dump($atime2 > $atime1); -} var_dump($mtime2 > $mtime1); ?> --CLEAN-- @@ -29,7 +17,5 @@ var_dump($mtime2 > $mtime1); unlink(__DIR__ . '/bug72666_variation3.txt'); ?> --EXPECT-- -string(4) "test" int(4) bool(true) -bool(true) From c531f3d79b1ddbddc04fe3a5b5f51e8d9c2f36d4 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Sat, 15 Mar 2025 12:18:08 +0100 Subject: [PATCH 50/65] Disable ZEND_RC_MOD_CHECK() while loading shared extension in FPM This fixes a ZEND_RC_MOD_CHECK() assertion failure when building with "-DZEND_RC_DEBUG=1 --enable-debug --enable-zts". php_dl() is called after startup, and manipulates the refcount of persistent strings, which is not allowed at this point of the lifecycle. The dl() function disables the ZEND_RC_MOD_CHECK() assertion before calling php_dl(). This change applies the same workaround in FPM. Closes GH-18075 --- sapi/fpm/fpm/fpm_php.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sapi/fpm/fpm/fpm_php.c b/sapi/fpm/fpm/fpm_php.c index b88c47671a1ec..2463f4351b605 100644 --- a/sapi/fpm/fpm/fpm_php.c +++ b/sapi/fpm/fpm/fpm_php.c @@ -93,7 +93,21 @@ int fpm_php_apply_defines_ex(struct key_value_s *kv, int mode) /* {{{ */ if (!strcmp(name, "extension") && *value) { zval zv; zend_interned_strings_switch_storage(0); + +#if ZEND_RC_DEBUG + bool orig_rc_debug = zend_rc_debug; + /* Loading extensions after php_module_startup() breaks some invariants. + * For instance, it will update the refcount of persistent strings, + * which is normally not allowed at this stage. */ + zend_rc_debug = false; +#endif + php_dl(value, MODULE_PERSISTENT, &zv, 1); + +#if ZEND_RC_DEBUG + zend_rc_debug = orig_rc_debug; +#endif + zend_interned_strings_switch_storage(1); return Z_TYPE(zv) == IS_TRUE ? FPM_PHP_INI_EXTENSION_LOADED : FPM_PHP_INI_EXTENSION_FAILED; } From d9329b15220ecc127cfce75d4fe1b6ca6fc6236d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 17 Mar 2025 20:05:43 +0100 Subject: [PATCH 51/65] Fix xinclude destruction of live attributes Follow-up for GH-17847 but now for attributes. Closes GH-18100. --- NEWS | 1 + ext/dom/document.c | 14 ++++++++++++++ ext/dom/tests/gh17847.phpt | 33 ++++++++++++++++++++++++++++++--- 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 59b66e85f84f9..46510db971ea7 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ PHP NEWS - DOM: . Fix weird unpack behaviour in DOM. (nielsdos) + . Fix xinclude destruction of live attributes. (nielsdos) - GD: . Fixed bug GH-17984 (calls with arguments as array with references). diff --git a/ext/dom/document.c b/ext/dom/document.c index 0388249766e1f..42d67d5739845 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1607,14 +1607,28 @@ static zend_always_inline xmlNodePtr php_dom_next_in_tree_order(const xmlNode *n } } +static void dom_xinclude_strip_references_for_attributes(xmlNodePtr basep) +{ + for (xmlAttrPtr prop = basep->properties; prop; prop = prop->next) { + php_libxml_node_free_resource((xmlNodePtr) prop); + for (xmlNodePtr child = prop->children; child; child = child->next) { + php_libxml_node_free_resource(child); + } + } +} + static void dom_xinclude_strip_references(xmlNodePtr basep) { php_libxml_node_free_resource(basep); + dom_xinclude_strip_references_for_attributes(basep); xmlNodePtr current = basep->children; while (current) { php_libxml_node_free_resource(current); + if (current->type == XML_ELEMENT_NODE) { + dom_xinclude_strip_references_for_attributes(current); + } current = php_dom_next_in_tree_order(current, basep); } } diff --git a/ext/dom/tests/gh17847.phpt b/ext/dom/tests/gh17847.phpt index 5d5df0b3be05f..01601ca035265 100644 --- a/ext/dom/tests/gh17847.phpt +++ b/ext/dom/tests/gh17847.phpt @@ -13,7 +13,7 @@ $doc->loadXML(<< -

garbage

+

garbage

@@ -22,15 +22,22 @@ XML); $xpath = new DOMXPath($doc); $garbage = []; -foreach ($xpath->query('//p') as $entry) +foreach ($xpath->query('//p') as $entry) { $garbage[] = $entry; + foreach ($entry->attributes as $attr) { + $garbage[] = $attr; + foreach ($attr->childNodes as $child) { + $garbage[] = $child; + } + } +} @$doc->xinclude(); var_dump($garbage); ?> --EXPECT-- -array(3) { +array(7) { [0]=> object(DOMElement)#3 (1) { ["schemaTypeInfo"]=> @@ -46,4 +53,24 @@ array(3) { ["schemaTypeInfo"]=> NULL } + [3]=> + object(DOMAttr)#10 (2) { + ["specified"]=> + bool(true) + ["schemaTypeInfo"]=> + NULL + } + [4]=> + object(DOMText)#13 (0) { + } + [5]=> + object(DOMAttr)#12 (2) { + ["specified"]=> + bool(true) + ["schemaTypeInfo"]=> + NULL + } + [6]=> + object(DOMText)#15 (0) { + } } From e9c029624031a4ce53e75f5a05997c7b95decad4 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 19 Mar 2025 23:33:40 +0100 Subject: [PATCH 52/65] Fix GH-18112: NULL access with preloading and INI option Preloading shutdown calls request shutdown which will deactivate the virtual cwd state. However, further startup code still assumes the state that was set by virtual_cwd_startup(). So we need to reactivate it manually. Creating a test was a bit difficult because the INI setting I wanted to test this with is overridden by the test runner apparently. To reproduce the issue, create an empty file test.php and execute this in a ZTS build: `php -d opcache.preload=./ext/opcache/tests/preload_class_alias_2.inc -d "error_log=" -d "allow_url_include=1" test.php` Closes GH-18117. --- NEWS | 3 +++ ext/opcache/ZendAccelerator.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 46510db971ea7..d639cd27f0cf6 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,9 @@ PHP NEWS . Fixed bug GH-17989 (mb_output_handler crash with unset http_output_conv_mimetypes). (nielsdos) +- Opcache: + . Fixed bug GH-18112 (NULL access with preloading and INI option). (nielsdos) + - SPL: . Fixed bug GH-18018 (RC1 data returned from offsetGet causes UAF in ArrayObject). (nielsdos) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index eac5cbbc41f7d..e3f7ca18151e5 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4662,6 +4662,11 @@ static zend_result accel_finish_startup_preload(bool in_child) EG(class_table) = NULL; EG(function_table) = NULL; PG(report_memleaks) = orig_report_memleaks; +#ifdef ZTS + /* Reset the virtual CWD state back to the original state created by virtual_cwd_startup(). + * This is necessary because the normal startup code assumes the CWD state is active. */ + virtual_cwd_activate(); +#endif } else { zend_shared_alloc_unlock(); ret = FAILURE; From 6af240d8dad7375611fb823cdc93201f240e7e4e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 20 Mar 2025 19:14:09 +0100 Subject: [PATCH 53/65] [ci skip] Fix NEWS order --- NEWS | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index d639cd27f0cf6..49b80ebb7aee0 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,13 @@ PHP NEWS . Fix weird unpack behaviour in DOM. (nielsdos) . Fix xinclude destruction of live attributes. (nielsdos) +- Embed: + . Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas) + +- Fuzzer: + . Fixed bug GH-18081 (Memory leaks in error paths of fuzzer SAPI). + (Lung-Alexandra) + - GD: . Fixed bug GH-17984 (calls with arguments as array with references). (David Carlier) @@ -23,13 +30,6 @@ PHP NEWS (David Carlier) . Fix UConverter::transcode with substitutes as references. (David Carlier) -- Embed: - . Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas) - -- Fuzzer: - . Fixed bug GH-18081 (Memory leaks in error paths of fuzzer SAPI). - (Lung-Alexandra) - - Mbstring: . Fixed bug GH-17989 (mb_output_handler crash with unset http_output_conv_mimetypes). (nielsdos) From 2dde07af55bb36d050f08dde4a7dba4f3cc1f181 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 20 Mar 2025 19:21:27 +0100 Subject: [PATCH 54/65] Fix memory leak when destroying PDORow This should call zend_object_std_dtor() to clean the property table etc. This also has a semantic influence because previously weak refs were not notified for example. This fixes the final issue in GH-18114 (the crash was master-only and fixed already). Closes GH-18114. Closes GH-18123. --- NEWS | 3 +++ ext/pdo/pdo_stmt.c | 1 + ext/pdo_sqlite/tests/gh18114.phpt | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 ext/pdo_sqlite/tests/gh18114.phpt diff --git a/NEWS b/NEWS index 49b80ebb7aee0..24db3cc4fbe76 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,9 @@ PHP NEWS - Opcache: . Fixed bug GH-18112 (NULL access with preloading and INI option). (nielsdos) +- PDO: + . Fix memory leak when destroying PDORow. (nielsdos) + - SPL: . Fixed bug GH-18018 (RC1 data returned from offsetGet causes UAF in ArrayObject). (nielsdos) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 6aec99026232b..efbf519e5411e 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2506,6 +2506,7 @@ void pdo_row_free_storage(zend_object *std) ZVAL_UNDEF(&row->stmt->lazy_object_ref); OBJ_RELEASE(&row->stmt->std); } + zend_object_std_dtor(std); } zend_object *pdo_row_new(zend_class_entry *ce) diff --git a/ext/pdo_sqlite/tests/gh18114.phpt b/ext/pdo_sqlite/tests/gh18114.phpt new file mode 100644 index 0000000000000..850558845485a --- /dev/null +++ b/ext/pdo_sqlite/tests/gh18114.phpt @@ -0,0 +1,19 @@ +--TEST-- +GH-18114 (pdo lazy object crash) +--EXTENSIONS-- +pdo_sqlite +--FILE-- +query('select 1 as queryString'); +$data = $x->fetch(PDO::FETCH_LAZY); +foreach ($data as $entry) { + var_dump($entry); +} +var_dump((array) $data); +echo "Done\n"; +?> +--EXPECT-- +array(0) { +} +Done From 209f4c296ec6a08c721afdf17d787db4b5fd37d0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 20 Mar 2025 09:26:26 +0100 Subject: [PATCH 55/65] Fix #66049 Typemap can break parsing in parse_packet_soap leading to a segfault --- ext/soap/php_packet_soap.c | 3 ++ ext/soap/tests/bugs/bug66049.phpt | 48 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 ext/soap/tests/bugs/bug66049.phpt diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c index c93451506ee3b..325821cd1fd7d 100644 --- a/ext/soap/php_packet_soap.c +++ b/ext/soap/php_packet_soap.c @@ -192,6 +192,7 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction if (tmp != NULL && tmp->children != NULL) { zval zv; master_to_zval(&zv, get_conversion(IS_STRING), tmp); + convert_to_string(&zv) faultstring = Z_STR(zv); } @@ -199,6 +200,7 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction if (tmp != NULL && tmp->children != NULL) { zval zv; master_to_zval(&zv, get_conversion(IS_STRING), tmp); + convert_to_string(&zv) faultactor = Z_STR(zv); } @@ -222,6 +224,7 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction if (tmp != NULL && tmp->children != NULL) { zval zv; master_to_zval(&zv, get_conversion(IS_STRING), tmp); + convert_to_string(&zv) faultstring = Z_STR(zv); } } diff --git a/ext/soap/tests/bugs/bug66049.phpt b/ext/soap/tests/bugs/bug66049.phpt new file mode 100644 index 0000000000000..e48845a8a142b --- /dev/null +++ b/ext/soap/tests/bugs/bug66049.phpt @@ -0,0 +1,48 @@ +--TEST-- +Fix #66049 Typemap can break parsing in parse_packet_soap leading to a segfault +--EXTENSIONS-- +soap +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- + + + + SOAP-ENV:Servernot present + '; + return $res; + } +} + +try { + $client=new TestSoapClient(null, [ + 'uri' => 'test://', + 'location' => 'test://', + 'typemap' => [[ + "type_ns" => "http://www.w3.org/2001/XMLSchema", + "type_name" => "string", + "from_xml" => "soap_string_from_xml" + ]]]); + $client->Mist(""); +} catch (SoapFault $e) { + var_dump($e->faultstring); + var_dump($e->faultcode); +} +?> +Done +--EXPECT-- +soap_string_from_xml +string(3) "2.3" +string(15) "SOAP-ENV:Server" +Done From 7e6a36889c2064029e948ce934203b17adc39319 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 21 Mar 2025 08:25:05 +0100 Subject: [PATCH 56/65] NEWS for #66049 --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 24db3cc4fbe76..0dce55195c180 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,10 @@ PHP NEWS - PDO: . Fix memory leak when destroying PDORow. (nielsdos) +- SOAP: + . Fixed bug #66049 (Typemap can break parsing in parse_packet_soap leading to + a segfault) . (Remi) + - SPL: . Fixed bug GH-18018 (RC1 data returned from offsetGet causes UAF in ArrayObject). (nielsdos) From 447d143b9d525d0cd4a7759af2357c7aec76a8d9 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:47:47 +0100 Subject: [PATCH 57/65] Fixed bug GH-13193 again Closes GH-13193. --- NEWS | 2 ++ Zend/zend_gc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0dce55195c180..02365adeb6463 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP NEWS (Arnaud) . Fixed bug GH-15367 (dl() of module with aliased class crashes in shutdown). (Arnaud) + . Fixed bug GH-13193 again (Significant performance degradation in 'foreach'). + (nielsdos) - DOM: . Fix weird unpack behaviour in DOM. (nielsdos) diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 3016ff8a1af04..20a764f9a3a24 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -1783,7 +1783,7 @@ ZEND_API int zend_gc_collect_cycles(void) bool did_rerun_gc = 0; zend_hrtime_t start_time = zend_hrtime(); - if (GC_G(num_roots) && GC_G(gc_active)) { + if (GC_G(num_roots) && !GC_G(gc_active)) { zend_gc_remove_root_tmpvars(); } From fa3c1c81d548953853f4cc06f96615b0ec9007e1 Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Thu, 20 Mar 2025 10:27:12 -0700 Subject: [PATCH 58/65] Fix GH-17836: zend_vm_gen.php shouldn't break on Windows line endings Closes GH-18121. --- NEWS | 4 ++++ Zend/zend_vm_gen.php | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 02365adeb6463..1e426e1f4c989 100644 --- a/NEWS +++ b/NEWS @@ -53,6 +53,10 @@ PHP NEWS - Treewide: . Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos) +- Windows: + . Fixed bug GH-17836 (zend_vm_gen.php shouldn't break on Windows line + endings). (DanielEScherzer) + 13 Mar 2025, PHP 8.3.19 - BCMath: diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 79b7653871272..64105f5659f17 100755 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -2401,6 +2401,12 @@ function gen_vm($def, $skel) { $max_opcode = 0; $extra_num = 256; foreach ($in as $line) { + // Handle Windows line endings, GH-17836; since a bunch of regular + // expressions below test for a newline at the end, just update the + // ending + if (substr($line, -2) === "\r\n") { + $line = substr_replace($line, "\n", -2); + } ++$lineno; if (strpos($line,"ZEND_VM_HANDLER(") === 0 || strpos($line,"ZEND_VM_INLINE_HANDLER(") === 0 || From 2ec8d37eb47681b547437cad77fd31b5ca9b3f3d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 18 Mar 2025 23:23:36 +0100 Subject: [PATCH 59/65] Fix GH-18107: Opcache CFG jmp optimization with try-finally breaks the exception table If there's a try-finally where the try_op starts on a basic block with a single JMP, and the JMP optimization causes that basic block to become unreachable, then we update try_op. In this case, there is no catch_op, so try_op is erroneously set to 0, we should instead set it to `b->start`. Closes GH-18110. --- NEWS | 2 ++ Zend/Optimizer/zend_cfg.c | 6 +++- ext/opcache/tests/opt/gh18107_1.phpt | 45 ++++++++++++++++++++++++ ext/opcache/tests/opt/gh18107_2.phpt | 52 ++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 ext/opcache/tests/opt/gh18107_1.phpt create mode 100644 ext/opcache/tests/opt/gh18107_2.phpt diff --git a/NEWS b/NEWS index 1e426e1f4c989..caad04f9d0895 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,8 @@ PHP NEWS - Opcache: . Fixed bug GH-18112 (NULL access with preloading and INI option). (nielsdos) + . Fixed bug GH-18107 (Opcache CFG jmp optimization with try-finally breaks + the exception table). (nielsdos) - PDO: . Fix memory leak when destroying PDORow. (nielsdos) diff --git a/Zend/Optimizer/zend_cfg.c b/Zend/Optimizer/zend_cfg.c index ce7d078bb957e..05cb36dd34428 100644 --- a/Zend/Optimizer/zend_cfg.c +++ b/Zend/Optimizer/zend_cfg.c @@ -144,7 +144,11 @@ static void zend_mark_reachable_blocks(const zend_op_array *op_array, zend_cfg * end = blocks + block_map[op_array->try_catch_array[j].finally_op]; while (b != end) { if (b->flags & ZEND_BB_REACHABLE) { - op_array->try_catch_array[j].try_op = op_array->try_catch_array[j].catch_op; + /* In case we get here, there is no live try block but there is a live finally block. + * If we do have catch_op set, we need to set it to the first catch block to satisfy + * the constraint try_op <= catch_op <= finally_op */ + op_array->try_catch_array[j].try_op = + op_array->try_catch_array[j].catch_op ? op_array->try_catch_array[j].catch_op : b->start; changed = 1; zend_mark_reachable(op_array->opcodes, cfg, blocks + block_map[op_array->try_catch_array[j].try_op]); break; diff --git a/ext/opcache/tests/opt/gh18107_1.phpt b/ext/opcache/tests/opt/gh18107_1.phpt new file mode 100644 index 0000000000000..0bb5b3201f203 --- /dev/null +++ b/ext/opcache/tests/opt/gh18107_1.phpt @@ -0,0 +1,45 @@ +--TEST-- +GH-18107 (Opcache CFG jmp optimization with try-finally breaks the exception table) +--CREDITS-- +SpencerMalone +--EXTENSIONS-- +opcache +--INI-- +opcache.optimization_level=0x10 +opcache.opt_debug_level=0x20000 +--FILE-- + +--EXPECTF-- +$_main: + ; (lines=%d, args=0, vars=%d, tmps=%d) + ; (after optimizer) + ; %s +0000 T1 = ISSET_ISEMPTY_CV (isset) CV0($badvar) +0001 JMPNZ T1 0006 +0002 V3 = NEW 1 string("Exception") +0003 SEND_VAL_EX string("Should happen") 1 +0004 DO_FCALL +0005 THROW V3 +0006 JMP 0006 +0007 V6 = NEW 1 string("Exception") +0008 SEND_VAL_EX string("Should not happen") 1 +0009 DO_FCALL +0010 THROW V6 +0011 FAST_RET T5 +EXCEPTION TABLE: + 0006, -, 0007, 0011 +Fatal error: Uncaught Exception: Should happen in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/ext/opcache/tests/opt/gh18107_2.phpt b/ext/opcache/tests/opt/gh18107_2.phpt new file mode 100644 index 0000000000000..0f4f66a4591bc --- /dev/null +++ b/ext/opcache/tests/opt/gh18107_2.phpt @@ -0,0 +1,52 @@ +--TEST-- +GH-18107 (Opcache CFG jmp optimization with try-finally breaks the exception table) +--CREDITS-- +SpencerMalone +--EXTENSIONS-- +opcache +--INI-- +opcache.optimization_level=0x10 +opcache.opt_debug_level=0x20000 +--FILE-- + +--EXPECTF-- +$_main: + ; (lines=%d, args=0, vars=%d, tmps=%d) + ; (after optimizer) + ; %s +0000 T2 = ISSET_ISEMPTY_CV (isset) CV0($badvar) +0001 JMPNZ T2 0008 +0002 V4 = NEW 1 string("Exception") +0003 SEND_VAL_EX string("Should happen") 1 +0004 DO_FCALL +0005 THROW V4 +0006 CV1($e) = CATCH string("Throwable") +0007 ECHO string("foo") +0008 T6 = FAST_CALL 0010 +0009 JMP 0015 +0010 V7 = NEW 1 string("Exception") +0011 SEND_VAL_EX string("Should not happen") 1 +0012 DO_FCALL +0013 THROW V7 +0014 FAST_RET T6 +0015 RETURN int(1) +EXCEPTION TABLE: + 0006, 0006, 0010, 0014 +Fatal error: Uncaught Exception: Should happen in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d From 8823f89a3282f1a77c2416779f9b0136c213e9fb Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 21 Mar 2025 06:23:03 -0700 Subject: [PATCH 60/65] Fix intl tests for icu 77 (#18125) --- ext/intl/tests/locale_get_display_name8.phpt | 12 ++++++------ ext/intl/tests/locale_get_display_variant2.phpt | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/intl/tests/locale_get_display_name8.phpt b/ext/intl/tests/locale_get_display_name8.phpt index e8c1ed958ac1c..aa91ee4c3b8ca 100644 --- a/ext/intl/tests/locale_get_display_name8.phpt +++ b/ext/intl/tests/locale_get_display_name8.phpt @@ -112,9 +112,9 @@ disp_locale=fr : display_name=slovène #Italie, NEDIS_KIRTI# disp_locale=de : display_name=Slowenisch #Italien, NEDIS_KIRTI# ----------------- locale='sl_IT_nedis-a-kirti-x-xyz' -disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI_X_XYZ# -disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI_X_XYZ# -disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI_X_XYZ# +disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI(_X_XYZ)?# +disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI(_X_XYZ)?# +disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI(_X_XYZ)?# ----------------- locale='sl_IT_rozaj' disp_locale=en : display_name=Slovenian #Italy, Resian# @@ -317,9 +317,9 @@ disp_locale=fr : display_name=anglais #États-Unis, attribute=islamcal# disp_locale=de : display_name=Englisch #Vereinigte Staaten, attribute=islamcal# ----------------- locale='zh-CN-a-myExt-x-private' -disp_locale=en : display_name=Chinese #China(, A_MYEXT_X_PRIVATE)?, a=myext, Private-Use=private# -disp_locale=fr : display_name=chinois #Chine(, A_MYEXT_X_PRIVATE)?, a=myext, usage privé=private# -disp_locale=de : display_name=Chinesisch #China(, A_MYEXT_X_PRIVATE)?, a=myext, Privatnutzung=private# +disp_locale=en : display_name=Chinese #China(, A_MYEXT(_X_PRIVATE)?)?, a=myext, Private-Use=private# +disp_locale=fr : display_name=chinois #Chine(, A_MYEXT(_X_PRIVATE)?)?, a=myext, usage privé=private# +disp_locale=de : display_name=Chinesisch #China(, A_MYEXT(_X_PRIVATE)?)?, a=myext, Privatnutzung=private# ----------------- locale='en-a-myExt-b-another' disp_locale=en : display_name=English #(A_MYEXT_B_ANOTHER, )?a=myext, b=another# diff --git a/ext/intl/tests/locale_get_display_variant2.phpt b/ext/intl/tests/locale_get_display_variant2.phpt index e56154902dde9..8e815e8c4e52a 100644 --- a/ext/intl/tests/locale_get_display_variant2.phpt +++ b/ext/intl/tests/locale_get_display_variant2.phpt @@ -248,9 +248,9 @@ disp_locale=fr : display_variant= disp_locale=de : display_variant= ----------------- locale='zh-CN-a-myExt-x-private' -disp_locale=en : display_variant=(A_MYEXT_X_PRIVATE)? -disp_locale=fr : display_variant=(A_MYEXT_X_PRIVATE)? -disp_locale=de : display_variant=(A_MYEXT_X_PRIVATE)? +disp_locale=en : display_variant=(A_MYEXT(_X_PRIVATE)?)? +disp_locale=fr : display_variant=(A_MYEXT(_X_PRIVATE)?)? +disp_locale=de : display_variant=(A_MYEXT(_X_PRIVATE)?)? ----------------- locale='en-a-myExt-b-another' disp_locale=en : display_variant=((A_)?MYEXT_B_ANOTHER)? From 071f707a6d883d46a3c6d932ec4045345d690e25 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 21 Mar 2025 16:35:26 +0100 Subject: [PATCH 61/65] [ci skip] Make sure opcache can output in these tests --- ext/opcache/tests/opt/gh18107_1.phpt | 2 ++ ext/opcache/tests/opt/gh18107_2.phpt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ext/opcache/tests/opt/gh18107_1.phpt b/ext/opcache/tests/opt/gh18107_1.phpt index 0bb5b3201f203..c99fa7efa40d3 100644 --- a/ext/opcache/tests/opt/gh18107_1.phpt +++ b/ext/opcache/tests/opt/gh18107_1.phpt @@ -5,6 +5,8 @@ SpencerMalone --EXTENSIONS-- opcache --INI-- +opcache.enable=1 +opcache.enable_cli=1 opcache.optimization_level=0x10 opcache.opt_debug_level=0x20000 --FILE-- diff --git a/ext/opcache/tests/opt/gh18107_2.phpt b/ext/opcache/tests/opt/gh18107_2.phpt index 0f4f66a4591bc..573bcd5ae4a6f 100644 --- a/ext/opcache/tests/opt/gh18107_2.phpt +++ b/ext/opcache/tests/opt/gh18107_2.phpt @@ -5,6 +5,8 @@ SpencerMalone --EXTENSIONS-- opcache --INI-- +opcache.enable=1 +opcache.enable_cli=1 opcache.optimization_level=0x10 opcache.opt_debug_level=0x20000 --FILE-- From 0c8a7a77a85b282da1e346b8a841d1c369d1911c Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 24 Mar 2025 10:06:32 +0000 Subject: [PATCH 62/65] Updated to version 2025.2 (2025b) --- ext/date/lib/timezonedb.h | 2251 ++++++++++++++++++++----------------- 1 file changed, 1239 insertions(+), 1012 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 3c75462009afb..a4cbb618799c8 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -4,7 +4,7 @@ #endif #ifdef TIMELIB_SUPPORT_SLIM_FILE -const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { +const timelib_tzdb_index_entry timezonedb_idx_builtin[598] = { { (char*) "Africa/Abidjan" , 0x000000 }, { (char*) "Africa/Accra" , 0x00008E }, { (char*) "Africa/Addis_Ababa" , 0x000356 }, @@ -104,508 +104,509 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "America/Coral_Harbour" , 0x00ADD3 }, { (char*) "America/Cordoba" , 0x00AE74 }, { (char*) "America/Costa_Rica" , 0x00B144 }, - { (char*) "America/Creston" , 0x00B238 }, - { (char*) "America/Cuiaba" , 0x00B2F4 }, - { (char*) "America/Curacao" , 0x00B6B1 }, - { (char*) "America/Danmarkshavn" , 0x00B754 }, - { (char*) "America/Dawson" , 0x00B939 }, - { (char*) "America/Dawson_Creek" , 0x00BD5C }, - { (char*) "America/Denver" , 0x00C033 }, - { (char*) "America/Detroit" , 0x00C466 }, - { (char*) "America/Dominica" , 0x00C80E }, - { (char*) "America/Edmonton" , 0x00C89C }, - { (char*) "America/Eirunepe" , 0x00CC94 }, - { (char*) "America/El_Salvador" , 0x00CE63 }, - { (char*) "America/Ensenada" , 0x00CF1F }, - { (char*) "America/Fort_Nelson" , 0x00D362 }, - { (char*) "America/Fort_Wayne" , 0x00D92A }, - { (char*) "America/Fortaleza" , 0x00DB49 }, - { (char*) "America/Glace_Bay" , 0x00DD5F }, - { (char*) "America/Godthab" , 0x00E0F6 }, - { (char*) "America/Goose_Bay" , 0x00E4C7 }, - { (char*) "America/Grand_Turk" , 0x00EB1F }, - { (char*) "America/Grenada" , 0x00EE80 }, - { (char*) "America/Guadeloupe" , 0x00EF0E }, - { (char*) "America/Guatemala" , 0x00EF9C }, - { (char*) "America/Guayaquil" , 0x00F07C }, - { (char*) "America/Guyana" , 0x00F14D }, - { (char*) "America/Halifax" , 0x00F20E }, - { (char*) "America/Havana" , 0x00F8C0 }, - { (char*) "America/Hermosillo" , 0x00FD29 }, - { (char*) "America/Indiana/Indianapolis" , 0x00FE3D }, - { (char*) "America/Indiana/Knox" , 0x010075 }, - { (char*) "America/Indiana/Marengo" , 0x01048E }, - { (char*) "America/Indiana/Petersburg" , 0x0106E8 }, - { (char*) "America/Indiana/Tell_City" , 0x0109B2 }, - { (char*) "America/Indiana/Vevay" , 0x010BDC }, - { (char*) "America/Indiana/Vincennes" , 0x010D73 }, - { (char*) "America/Indiana/Winamac" , 0x010FC9 }, - { (char*) "America/Indianapolis" , 0x011246 }, - { (char*) "America/Inuvik" , 0x011465 }, - { (char*) "America/Iqaluit" , 0x0117B6 }, - { (char*) "America/Jamaica" , 0x011B32 }, - { (char*) "America/Jujuy" , 0x011C91 }, - { (char*) "America/Juneau" , 0x011F4F }, - { (char*) "America/Kentucky/Louisville" , 0x012335 }, - { (char*) "America/Kentucky/Monticello" , 0x012839 }, - { (char*) "America/Knox_IN" , 0x012C25 }, - { (char*) "America/Kralendijk" , 0x013029 }, - { (char*) "America/La_Paz" , 0x0130E6 }, - { (char*) "America/Lima" , 0x01319C }, - { (char*) "America/Los_Angeles" , 0x0132C3 }, - { (char*) "America/Louisville" , 0x0137E4 }, - { (char*) "America/Lower_Princes" , 0x013CCA }, - { (char*) "America/Maceio" , 0x013D87 }, - { (char*) "America/Managua" , 0x013F99 }, - { (char*) "America/Manaus" , 0x0140CC }, - { (char*) "America/Marigot" , 0x014283 }, - { (char*) "America/Martinique" , 0x014340 }, - { (char*) "America/Matamoros" , 0x0143FE }, - { (char*) "America/Mazatlan" , 0x0145EB }, - { (char*) "America/Mendoza" , 0x0148DB }, - { (char*) "America/Menominee" , 0x014BAB }, - { (char*) "America/Merida" , 0x014F6B }, - { (char*) "America/Metlakatla" , 0x015216 }, - { (char*) "America/Mexico_City" , 0x015483 }, - { (char*) "America/Miquelon" , 0x0157A2 }, - { (char*) "America/Moncton" , 0x0159D4 }, - { (char*) "America/Monterrey" , 0x015FCD }, - { (char*) "America/Montevideo" , 0x0162D4 }, - { (char*) "America/Montreal" , 0x0166A9 }, - { (char*) "America/Montserrat" , 0x016D6A }, - { (char*) "America/Nassau" , 0x016DF8 }, - { (char*) "America/New_York" , 0x0171F2 }, - { (char*) "America/Nipigon" , 0x0178E2 }, - { (char*) "America/Nome" , 0x017FA3 }, - { (char*) "America/Noronha" , 0x01838B }, - { (char*) "America/North_Dakota/Beulah" , 0x01858B }, - { (char*) "America/North_Dakota/Center" , 0x0189BF }, - { (char*) "America/North_Dakota/New_Salem" , 0x018DBE }, - { (char*) "America/Nuuk" , 0x0191C3 }, - { (char*) "America/Ojinaga" , 0x0195A5 }, - { (char*) "America/Panama" , 0x01989B }, - { (char*) "America/Pangnirtung" , 0x01993C }, - { (char*) "America/Paramaribo" , 0x019C9F }, - { (char*) "America/Phoenix" , 0x019D66 }, - { (char*) "America/Port-au-Prince" , 0x019E7A }, - { (char*) "America/Port_of_Spain" , 0x01A0BB }, - { (char*) "America/Porto_Acre" , 0x01A149 }, - { (char*) "America/Porto_Velho" , 0x01A2F7 }, - { (char*) "America/Puerto_Rico" , 0x01A495 }, - { (char*) "America/Punta_Arenas" , 0x01A552 }, - { (char*) "America/Rainy_River" , 0x01AA34 }, - { (char*) "America/Rankin_Inlet" , 0x01AF4E }, - { (char*) "America/Recife" , 0x01B297 }, - { (char*) "America/Regina" , 0x01B491 }, - { (char*) "America/Resolute" , 0x01B730 }, - { (char*) "America/Rio_Branco" , 0x01BA7A }, - { (char*) "America/Rosario" , 0x01BC2C }, - { (char*) "America/Santa_Isabel" , 0x01BEFC }, - { (char*) "America/Santarem" , 0x01C33F }, - { (char*) "America/Santiago" , 0x01C4EF }, - { (char*) "America/Santo_Domingo" , 0x01CA52 }, - { (char*) "America/Sao_Paulo" , 0x01CB9B }, - { (char*) "America/Scoresbysund" , 0x01CF95 }, - { (char*) "America/Shiprock" , 0x01D396 }, - { (char*) "America/Sitka" , 0x01D7B4 }, - { (char*) "America/St_Barthelemy" , 0x01DB8F }, - { (char*) "America/St_Johns" , 0x01DC4C }, - { (char*) "America/St_Kitts" , 0x01E3C9 }, - { (char*) "America/St_Lucia" , 0x01E457 }, - { (char*) "America/St_Thomas" , 0x01E4F8 }, - { (char*) "America/St_Vincent" , 0x01E586 }, - { (char*) "America/Swift_Current" , 0x01E627 }, - { (char*) "America/Tegucigalpa" , 0x01E7B5 }, - { (char*) "America/Thule" , 0x01E883 }, - { (char*) "America/Thunder_Bay" , 0x01EA64 }, - { (char*) "America/Tijuana" , 0x01F125 }, - { (char*) "America/Toronto" , 0x01F577 }, - { (char*) "America/Tortola" , 0x01FC56 }, - { (char*) "America/Vancouver" , 0x01FCE4 }, - { (char*) "America/Virgin" , 0x02023B }, - { (char*) "America/Whitehorse" , 0x0202F8 }, - { (char*) "America/Winnipeg" , 0x02071B }, - { (char*) "America/Yakutat" , 0x020C52 }, - { (char*) "America/Yellowknife" , 0x021020 }, - { (char*) "Antarctica/Casey" , 0x0213F6 }, - { (char*) "Antarctica/Davis" , 0x021526 }, - { (char*) "Antarctica/DumontDUrville" , 0x0215FC }, - { (char*) "Antarctica/Macquarie" , 0x0216B0 }, - { (char*) "Antarctica/Mawson" , 0x021A9C }, - { (char*) "Antarctica/McMurdo" , 0x021B46 }, - { (char*) "Antarctica/Palmer" , 0x021E78 }, - { (char*) "Antarctica/Rothera" , 0x022201 }, - { (char*) "Antarctica/South_Pole" , 0x022298 }, - { (char*) "Antarctica/Syowa" , 0x0226B7 }, - { (char*) "Antarctica/Troll" , 0x02274D }, - { (char*) "Antarctica/Vostok" , 0x0227FC }, - { (char*) "Arctic/Longyearbyen" , 0x0228B8 }, - { (char*) "Asia/Aden" , 0x022B85 }, - { (char*) "Asia/Almaty" , 0x022C16 }, - { (char*) "Asia/Amman" , 0x022E9E }, - { (char*) "Asia/Anadyr" , 0x02324A }, - { (char*) "Asia/Aqtau" , 0x023550 }, - { (char*) "Asia/Aqtobe" , 0x0237CF }, - { (char*) "Asia/Ashgabat" , 0x023A4F }, - { (char*) "Asia/Ashkhabad" , 0x023BD2 }, - { (char*) "Asia/Atyrau" , 0x023D55 }, - { (char*) "Asia/Baghdad" , 0x023FDE }, - { (char*) "Asia/Bahrain" , 0x024260 }, - { (char*) "Asia/Baku" , 0x024319 }, - { (char*) "Asia/Bangkok" , 0x02460D }, - { (char*) "Asia/Barnaul" , 0x0246B1 }, - { (char*) "Asia/Beirut" , 0x0249BC }, - { (char*) "Asia/Bishkek" , 0x024CA4 }, - { (char*) "Asia/Brunei" , 0x024F1A }, - { (char*) "Asia/Calcutta" , 0x024FC0 }, - { (char*) "Asia/Chita" , 0x0250A8 }, - { (char*) "Asia/Choibalsan" , 0x0253B6 }, - { (char*) "Asia/Chongqing" , 0x025614 }, - { (char*) "Asia/Chungking" , 0x0257A9 }, - { (char*) "Asia/Colombo" , 0x02593E }, - { (char*) "Asia/Dacca" , 0x025A41 }, - { (char*) "Asia/Damascus" , 0x025B34 }, - { (char*) "Asia/Dhaka" , 0x026012 }, - { (char*) "Asia/Dili" , 0x026105 }, - { (char*) "Asia/Dubai" , 0x0261BB }, - { (char*) "Asia/Dushanbe" , 0x02624C }, - { (char*) "Asia/Famagusta" , 0x0263C6 }, - { (char*) "Asia/Gaza" , 0x02678D }, - { (char*) "Asia/Harbin" , 0x027329 }, - { (char*) "Asia/Hebron" , 0x0274BE }, - { (char*) "Asia/Ho_Chi_Minh" , 0x02806B }, - { (char*) "Asia/Hong_Kong" , 0x028163 }, - { (char*) "Asia/Hovd" , 0x028476 }, - { (char*) "Asia/Irkutsk" , 0x0286EA }, - { (char*) "Asia/Istanbul" , 0x028A08 }, - { (char*) "Asia/Jakarta" , 0x028EC4 }, - { (char*) "Asia/Jayapura" , 0x028FD5 }, - { (char*) "Asia/Jerusalem" , 0x0290C2 }, - { (char*) "Asia/Kabul" , 0x029500 }, - { (char*) "Asia/Kamchatka" , 0x0295AB }, - { (char*) "Asia/Karachi" , 0x0298A0 }, - { (char*) "Asia/Kashgar" , 0x0299B6 }, - { (char*) "Asia/Kathmandu" , 0x029A47 }, - { (char*) "Asia/Katmandu" , 0x029AF4 }, - { (char*) "Asia/Khandyga" , 0x029BA1 }, - { (char*) "Asia/Kolkata" , 0x029ED2 }, - { (char*) "Asia/Krasnoyarsk" , 0x029FBA }, - { (char*) "Asia/Kuala_Lumpur" , 0x02A2C4 }, - { (char*) "Asia/Kuching" , 0x02A3E4 }, - { (char*) "Asia/Kuwait" , 0x02A53E }, - { (char*) "Asia/Macao" , 0x02A5CF }, - { (char*) "Asia/Macau" , 0x02A8F2 }, - { (char*) "Asia/Magadan" , 0x02AC15 }, - { (char*) "Asia/Makassar" , 0x02AF20 }, - { (char*) "Asia/Manila" , 0x02B033 }, - { (char*) "Asia/Muscat" , 0x02B151 }, - { (char*) "Asia/Nicosia" , 0x02B1E2 }, - { (char*) "Asia/Novokuznetsk" , 0x02B451 }, - { (char*) "Asia/Novosibirsk" , 0x02B744 }, - { (char*) "Asia/Omsk" , 0x02BA55 }, - { (char*) "Asia/Oral" , 0x02BD53 }, - { (char*) "Asia/Phnom_Penh" , 0x02BFDF }, - { (char*) "Asia/Pontianak" , 0x02C0B3 }, - { (char*) "Asia/Pyongyang" , 0x02C1CC }, - { (char*) "Asia/Qatar" , 0x02C28F }, - { (char*) "Asia/Qostanay" , 0x02C333 }, - { (char*) "Asia/Qyzylorda" , 0x02C5C9 }, - { (char*) "Asia/Rangoon" , 0x02C862 }, - { (char*) "Asia/Riyadh" , 0x02C929 }, - { (char*) "Asia/Saigon" , 0x02C9BA }, - { (char*) "Asia/Sakhalin" , 0x02CAB2 }, - { (char*) "Asia/Samarkand" , 0x02CDC9 }, - { (char*) "Asia/Seoul" , 0x02CF54 }, - { (char*) "Asia/Shanghai" , 0x02D0FF }, - { (char*) "Asia/Singapore" , 0x02D2A0 }, - { (char*) "Asia/Srednekolymsk" , 0x02D3AC }, - { (char*) "Asia/Taipei" , 0x02D6BC }, - { (char*) "Asia/Tashkent" , 0x02D8C7 }, - { (char*) "Asia/Tbilisi" , 0x02DA52 }, - { (char*) "Asia/Tehran" , 0x02DCD3 }, - { (char*) "Asia/Tel_Aviv" , 0x02E00B }, - { (char*) "Asia/Thimbu" , 0x02E449 }, - { (char*) "Asia/Thimphu" , 0x02E4EF }, - { (char*) "Asia/Tokyo" , 0x02E595 }, - { (char*) "Asia/Tomsk" , 0x02E676 }, - { (char*) "Asia/Ujung_Pandang" , 0x02E981 }, - { (char*) "Asia/Ulaanbaatar" , 0x02EA4B }, - { (char*) "Asia/Ulan_Bator" , 0x02ECB9 }, - { (char*) "Asia/Urumqi" , 0x02EF17 }, - { (char*) "Asia/Ust-Nera" , 0x02EFB5 }, - { (char*) "Asia/Vientiane" , 0x02F2D8 }, - { (char*) "Asia/Vladivostok" , 0x02F3BE }, - { (char*) "Asia/Yakutsk" , 0x02F6C3 }, - { (char*) "Asia/Yangon" , 0x02F9C7 }, - { (char*) "Asia/Yekaterinburg" , 0x02FA8E }, - { (char*) "Asia/Yerevan" , 0x02FDA0 }, - { (char*) "Atlantic/Azores" , 0x030070 }, - { (char*) "Atlantic/Bermuda" , 0x0305FB }, - { (char*) "Atlantic/Canary" , 0x030A07 }, - { (char*) "Atlantic/Cape_Verde" , 0x030BFF }, - { (char*) "Atlantic/Faeroe" , 0x030CBA }, - { (char*) "Atlantic/Faroe" , 0x030E7F }, - { (char*) "Atlantic/Jan_Mayen" , 0x031044 }, - { (char*) "Atlantic/Madeira" , 0x031311 }, - { (char*) "Atlantic/Reykjavik" , 0x031888 }, - { (char*) "Atlantic/South_Georgia" , 0x031B85 }, - { (char*) "Atlantic/St_Helena" , 0x031C15 }, - { (char*) "Atlantic/Stanley" , 0x031CB6 }, - { (char*) "Australia/ACT" , 0x031FD7 }, - { (char*) "Australia/Adelaide" , 0x03236B }, - { (char*) "Australia/Brisbane" , 0x03271F }, - { (char*) "Australia/Broken_Hill" , 0x032863 }, - { (char*) "Australia/Canberra" , 0x032C38 }, - { (char*) "Australia/Currie" , 0x032FCC }, - { (char*) "Australia/Darwin" , 0x0333C3 }, - { (char*) "Australia/Eucla" , 0x0334CB }, - { (char*) "Australia/Hobart" , 0x03362A }, - { (char*) "Australia/LHI" , 0x033A29 }, - { (char*) "Australia/Lindeman" , 0x033CE9 }, - { (char*) "Australia/Lord_Howe" , 0x033E59 }, - { (char*) "Australia/Melbourne" , 0x034129 }, - { (char*) "Australia/North" , 0x0344C5 }, - { (char*) "Australia/NSW" , 0x0345BB }, - { (char*) "Australia/Perth" , 0x03494F }, - { (char*) "Australia/Queensland" , 0x034AAB }, - { (char*) "Australia/South" , 0x034BD8 }, - { (char*) "Australia/Sydney" , 0x034F7D }, - { (char*) "Australia/Tasmania" , 0x03532D }, - { (char*) "Australia/Victoria" , 0x035724 }, - { (char*) "Australia/West" , 0x035AB8 }, - { (char*) "Australia/Yancowinna" , 0x035BF6 }, - { (char*) "Brazil/Acre" , 0x035FAF }, - { (char*) "Brazil/DeNoronha" , 0x03615D }, - { (char*) "Brazil/East" , 0x03634D }, - { (char*) "Brazil/West" , 0x036711 }, - { (char*) "Canada/Atlantic" , 0x0368B9 }, - { (char*) "Canada/Central" , 0x036F4D }, - { (char*) "Canada/Eastern" , 0x037467 }, - { (char*) "Canada/Mountain" , 0x037B28 }, - { (char*) "Canada/Newfoundland" , 0x037EFE }, - { (char*) "Canada/Pacific" , 0x038660 }, - { (char*) "Canada/Saskatchewan" , 0x038B9E }, - { (char*) "Canada/Yukon" , 0x038E28 }, - { (char*) "CET" , 0x039239 }, - { (char*) "Chile/Continental" , 0x039694 }, - { (char*) "Chile/EasterIsland" , 0x039BEA }, - { (char*) "CST6CDT" , 0x03A08C }, - { (char*) "Cuba" , 0x03A772 }, - { (char*) "EET" , 0x03ABDB }, - { (char*) "Egypt" , 0x03AE91 }, - { (char*) "Eire" , 0x03B3BA }, - { (char*) "EST" , 0x03B99E }, - { (char*) "EST5EDT" , 0x03BA3F }, - { (char*) "Etc/GMT" , 0x03C11B }, - { (char*) "Etc/GMT+0" , 0x03C196 }, - { (char*) "Etc/GMT+1" , 0x03C211 }, - { (char*) "Etc/GMT+10" , 0x03C28E }, - { (char*) "Etc/GMT+11" , 0x03C30C }, - { (char*) "Etc/GMT+12" , 0x03C38A }, - { (char*) "Etc/GMT+2" , 0x03C408 }, - { (char*) "Etc/GMT+3" , 0x03C485 }, - { (char*) "Etc/GMT+4" , 0x03C502 }, - { (char*) "Etc/GMT+5" , 0x03C57F }, - { (char*) "Etc/GMT+6" , 0x03C5FC }, - { (char*) "Etc/GMT+7" , 0x03C679 }, - { (char*) "Etc/GMT+8" , 0x03C6F6 }, - { (char*) "Etc/GMT+9" , 0x03C773 }, - { (char*) "Etc/GMT-0" , 0x03C7F0 }, - { (char*) "Etc/GMT-1" , 0x03C86B }, - { (char*) "Etc/GMT-10" , 0x03C8E9 }, - { (char*) "Etc/GMT-11" , 0x03C968 }, - { (char*) "Etc/GMT-12" , 0x03C9E7 }, - { (char*) "Etc/GMT-13" , 0x03CA66 }, - { (char*) "Etc/GMT-14" , 0x03CAE5 }, - { (char*) "Etc/GMT-2" , 0x03CB64 }, - { (char*) "Etc/GMT-3" , 0x03CBE2 }, - { (char*) "Etc/GMT-4" , 0x03CC60 }, - { (char*) "Etc/GMT-5" , 0x03CCDE }, - { (char*) "Etc/GMT-6" , 0x03CD5C }, - { (char*) "Etc/GMT-7" , 0x03CDDA }, - { (char*) "Etc/GMT-8" , 0x03CE58 }, - { (char*) "Etc/GMT-9" , 0x03CED6 }, - { (char*) "Etc/GMT0" , 0x03CF54 }, - { (char*) "Etc/Greenwich" , 0x03CFCF }, - { (char*) "Etc/UCT" , 0x03D04A }, - { (char*) "Etc/Universal" , 0x03D0C5 }, - { (char*) "Etc/UTC" , 0x03D140 }, - { (char*) "Etc/Zulu" , 0x03D1BB }, - { (char*) "Europe/Amsterdam" , 0x03D236 }, - { (char*) "Europe/Andorra" , 0x03D671 }, - { (char*) "Europe/Astrakhan" , 0x03D802 }, - { (char*) "Europe/Athens" , 0x03DAF6 }, - { (char*) "Europe/Belfast" , 0x03DDAC }, - { (char*) "Europe/Belgrade" , 0x03E3F7 }, - { (char*) "Europe/Berlin" , 0x03E5E1 }, - { (char*) "Europe/Bratislava" , 0x03E8BD }, - { (char*) "Europe/Brussels" , 0x03EB9C }, - { (char*) "Europe/Bucharest" , 0x03EFF7 }, - { (char*) "Europe/Budapest" , 0x03F298 }, - { (char*) "Europe/Busingen" , 0x03F5A2 }, - { (char*) "Europe/Chisinau" , 0x03F7A7 }, - { (char*) "Europe/Copenhagen" , 0x03FAA6 }, - { (char*) "Europe/Dublin" , 0x03FD21 }, - { (char*) "Europe/Gibraltar" , 0x040305 }, - { (char*) "Europe/Guernsey" , 0x0407D5 }, - { (char*) "Europe/Helsinki" , 0x040E2C }, - { (char*) "Europe/Isle_of_Man" , 0x041019 }, - { (char*) "Europe/Istanbul" , 0x041664 }, - { (char*) "Europe/Jersey" , 0x041B20 }, - { (char*) "Europe/Kaliningrad" , 0x042177 }, - { (char*) "Europe/Kiev" , 0x04251F }, - { (char*) "Europe/Kirov" , 0x042759 }, - { (char*) "Europe/Kyiv" , 0x042A52 }, - { (char*) "Europe/Lisbon" , 0x042C9B }, - { (char*) "Europe/Ljubljana" , 0x043271 }, - { (char*) "Europe/London" , 0x04345B }, - { (char*) "Europe/Luxembourg" , 0x043AA6 }, - { (char*) "Europe/Madrid" , 0x043EF1 }, - { (char*) "Europe/Malta" , 0x04428E }, - { (char*) "Europe/Mariehamn" , 0x04463A }, - { (char*) "Europe/Minsk" , 0x044827 }, - { (char*) "Europe/Monaco" , 0x044B5B }, - { (char*) "Europe/Moscow" , 0x044FC1 }, - { (char*) "Europe/Nicosia" , 0x04536D }, - { (char*) "Europe/Oslo" , 0x0455CE }, - { (char*) "Europe/Paris" , 0x04587E }, - { (char*) "Europe/Podgorica" , 0x045CDB }, - { (char*) "Europe/Prague" , 0x045EC5 }, - { (char*) "Europe/Riga" , 0x0461A4 }, - { (char*) "Europe/Rome" , 0x046466 }, - { (char*) "Europe/Samara" , 0x046825 }, - { (char*) "Europe/San_Marino" , 0x046B26 }, - { (char*) "Europe/Sarajevo" , 0x046EE5 }, - { (char*) "Europe/Saratov" , 0x0470CF }, - { (char*) "Europe/Simferopol" , 0x0473C1 }, - { (char*) "Europe/Skopje" , 0x047734 }, - { (char*) "Europe/Sofia" , 0x04791E }, - { (char*) "Europe/Stockholm" , 0x047B7A }, - { (char*) "Europe/Tallinn" , 0x047D77 }, - { (char*) "Europe/Tirane" , 0x048026 }, - { (char*) "Europe/Tiraspol" , 0x04828E }, - { (char*) "Europe/Ulyanovsk" , 0x04858D }, - { (char*) "Europe/Uzhgorod" , 0x0488A3 }, - { (char*) "Europe/Vaduz" , 0x048ADD }, - { (char*) "Europe/Vatican" , 0x048CC7 }, - { (char*) "Europe/Vienna" , 0x049086 }, - { (char*) "Europe/Vilnius" , 0x049324 }, - { (char*) "Europe/Volgograd" , 0x0495D4 }, - { (char*) "Europe/Warsaw" , 0x0498E3 }, - { (char*) "Europe/Zagreb" , 0x049C8A }, - { (char*) "Europe/Zaporozhye" , 0x049E74 }, - { (char*) "Europe/Zurich" , 0x04A0AE }, - { (char*) "Factory" , 0x04A2AB }, - { (char*) "GB" , 0x04A328 }, - { (char*) "GB-Eire" , 0x04A973 }, - { (char*) "GMT" , 0x04AFBE }, - { (char*) "GMT+0" , 0x04B039 }, - { (char*) "GMT-0" , 0x04B0B4 }, - { (char*) "GMT0" , 0x04B12F }, - { (char*) "Greenwich" , 0x04B1AA }, - { (char*) "Hongkong" , 0x04B225 }, - { (char*) "HST" , 0x04B538 }, - { (char*) "Iceland" , 0x04B621 }, - { (char*) "Indian/Antananarivo" , 0x04B6AF }, - { (char*) "Indian/Chagos" , 0x04B75B }, - { (char*) "Indian/Christmas" , 0x04B7FF }, - { (char*) "Indian/Cocos" , 0x04B890 }, - { (char*) "Indian/Comoro" , 0x04B928 }, - { (char*) "Indian/Kerguelen" , 0x04B9B7 }, - { (char*) "Indian/Mahe" , 0x04BA48 }, - { (char*) "Indian/Maldives" , 0x04BAD9 }, - { (char*) "Indian/Mauritius" , 0x04BB7D }, - { (char*) "Indian/Mayotte" , 0x04BC3C }, - { (char*) "Indian/Reunion" , 0x04BCCB }, - { (char*) "Iran" , 0x04BD5C }, - { (char*) "Israel" , 0x04C094 }, - { (char*) "Jamaica" , 0x04C4D2 }, - { (char*) "Japan" , 0x04C631 }, - { (char*) "Kwajalein" , 0x04C712 }, - { (char*) "Libya" , 0x04C7F9 }, - { (char*) "MET" , 0x04C9B4 }, - { (char*) "Mexico/BajaNorte" , 0x04CE0F }, - { (char*) "Mexico/BajaSur" , 0x04D252 }, - { (char*) "Mexico/General" , 0x04D510 }, - { (char*) "MST" , 0x04D821 }, - { (char*) "MST7MDT" , 0x04D91D }, - { (char*) "Navajo" , 0x04DD3B }, - { (char*) "NZ" , 0x04E159 }, - { (char*) "NZ-CHAT" , 0x04E578 }, - { (char*) "Pacific/Apia" , 0x04E8AC }, - { (char*) "Pacific/Auckland" , 0x04EA4F }, - { (char*) "Pacific/Bougainville" , 0x04EE81 }, - { (char*) "Pacific/Chatham" , 0x04EF62 }, - { (char*) "Pacific/Chuuk" , 0x04F2A5 }, - { (char*) "Pacific/Easter" , 0x04F383 }, - { (char*) "Pacific/Efate" , 0x04F832 }, - { (char*) "Pacific/Enderbury" , 0x04F994 }, - { (char*) "Pacific/Fakaofo" , 0x04FA4C }, - { (char*) "Pacific/Fiji" , 0x04FAF1 }, - { (char*) "Pacific/Funafuti" , 0x04FC89 }, - { (char*) "Pacific/Galapagos" , 0x04FD1B }, - { (char*) "Pacific/Gambier" , 0x04FDE7 }, - { (char*) "Pacific/Guadalcanal" , 0x04FE86 }, - { (char*) "Pacific/Guam" , 0x04FF18 }, - { (char*) "Pacific/Honolulu" , 0x050082 }, - { (char*) "Pacific/Johnston" , 0x050171 }, - { (char*) "Pacific/Kanton" , 0x05025A }, - { (char*) "Pacific/Kiritimati" , 0x050321 }, - { (char*) "Pacific/Kosrae" , 0x0503E7 }, - { (char*) "Pacific/Kwajalein" , 0x0504EB }, - { (char*) "Pacific/Majuro" , 0x0505DB }, - { (char*) "Pacific/Marquesas" , 0x0506D9 }, - { (char*) "Pacific/Midway" , 0x050781 }, - { (char*) "Pacific/Nauru" , 0x050844 }, - { (char*) "Pacific/Niue" , 0x050907 }, - { (char*) "Pacific/Norfolk" , 0x0509AD }, - { (char*) "Pacific/Noumea" , 0x050AA6 }, - { (char*) "Pacific/Pago_Pago" , 0x050B78 }, - { (char*) "Pacific/Palau" , 0x050C16 }, - { (char*) "Pacific/Pitcairn" , 0x050CB6 }, - { (char*) "Pacific/Pohnpei" , 0x050D5B }, - { (char*) "Pacific/Ponape" , 0x050E4B }, - { (char*) "Pacific/Port_Moresby" , 0x050EDD }, - { (char*) "Pacific/Rarotonga" , 0x050F9B }, - { (char*) "Pacific/Saipan" , 0x05113D }, - { (char*) "Pacific/Samoa" , 0x05129E }, - { (char*) "Pacific/Tahiti" , 0x05133C }, - { (char*) "Pacific/Tarawa" , 0x0513DC }, - { (char*) "Pacific/Tongatapu" , 0x05147D }, - { (char*) "Pacific/Truk" , 0x051576 }, - { (char*) "Pacific/Wake" , 0x05161C }, - { (char*) "Pacific/Wallis" , 0x0516B9 }, - { (char*) "Pacific/Yap" , 0x05174B }, - { (char*) "Poland" , 0x0517F1 }, - { (char*) "Portugal" , 0x051B98 }, - { (char*) "PRC" , 0x05215B }, - { (char*) "PST8PDT" , 0x0522F0 }, - { (char*) "ROC" , 0x05280A }, - { (char*) "ROK" , 0x052A15 }, - { (char*) "Singapore" , 0x052BC0 }, - { (char*) "Turkey" , 0x052CCC }, - { (char*) "UCT" , 0x053188 }, - { (char*) "Universal" , 0x053203 }, - { (char*) "US/Alaska" , 0x05327E }, - { (char*) "US/Aleutian" , 0x05365B }, - { (char*) "US/Arizona" , 0x053A30 }, - { (char*) "US/Central" , 0x053B2C }, - { (char*) "US/East-Indiana" , 0x054212 }, - { (char*) "US/Eastern" , 0x054431 }, - { (char*) "US/Hawaii" , 0x054B0D }, - { (char*) "US/Indiana-Starke" , 0x054BF6 }, - { (char*) "US/Michigan" , 0x054FFA }, - { (char*) "US/Mountain" , 0x055389 }, - { (char*) "US/Pacific" , 0x0557A7 }, - { (char*) "US/Samoa" , 0x055CC1 }, - { (char*) "UTC" , 0x055D5F }, - { (char*) "W-SU" , 0x055DDA }, - { (char*) "WET" , 0x056172 }, - { (char*) "Zulu" , 0x056735 }, + { (char*) "America/Coyhaique" , 0x00B238 }, + { (char*) "America/Creston" , 0x00B7A2 }, + { (char*) "America/Cuiaba" , 0x00B85E }, + { (char*) "America/Curacao" , 0x00BC1B }, + { (char*) "America/Danmarkshavn" , 0x00BCBE }, + { (char*) "America/Dawson" , 0x00BEA3 }, + { (char*) "America/Dawson_Creek" , 0x00C2C6 }, + { (char*) "America/Denver" , 0x00C59D }, + { (char*) "America/Detroit" , 0x00C9D0 }, + { (char*) "America/Dominica" , 0x00CD78 }, + { (char*) "America/Edmonton" , 0x00CE06 }, + { (char*) "America/Eirunepe" , 0x00D1FE }, + { (char*) "America/El_Salvador" , 0x00D3CD }, + { (char*) "America/Ensenada" , 0x00D489 }, + { (char*) "America/Fort_Nelson" , 0x00D8CC }, + { (char*) "America/Fort_Wayne" , 0x00DE94 }, + { (char*) "America/Fortaleza" , 0x00E0B3 }, + { (char*) "America/Glace_Bay" , 0x00E2C9 }, + { (char*) "America/Godthab" , 0x00E660 }, + { (char*) "America/Goose_Bay" , 0x00EA31 }, + { (char*) "America/Grand_Turk" , 0x00F089 }, + { (char*) "America/Grenada" , 0x00F3EA }, + { (char*) "America/Guadeloupe" , 0x00F478 }, + { (char*) "America/Guatemala" , 0x00F506 }, + { (char*) "America/Guayaquil" , 0x00F5E6 }, + { (char*) "America/Guyana" , 0x00F6B7 }, + { (char*) "America/Halifax" , 0x00F778 }, + { (char*) "America/Havana" , 0x00FE2A }, + { (char*) "America/Hermosillo" , 0x010293 }, + { (char*) "America/Indiana/Indianapolis" , 0x0103A7 }, + { (char*) "America/Indiana/Knox" , 0x0105DF }, + { (char*) "America/Indiana/Marengo" , 0x0109F8 }, + { (char*) "America/Indiana/Petersburg" , 0x010C52 }, + { (char*) "America/Indiana/Tell_City" , 0x010F1C }, + { (char*) "America/Indiana/Vevay" , 0x011146 }, + { (char*) "America/Indiana/Vincennes" , 0x0112DD }, + { (char*) "America/Indiana/Winamac" , 0x011533 }, + { (char*) "America/Indianapolis" , 0x0117B0 }, + { (char*) "America/Inuvik" , 0x0119CF }, + { (char*) "America/Iqaluit" , 0x011D20 }, + { (char*) "America/Jamaica" , 0x01209C }, + { (char*) "America/Jujuy" , 0x0121FB }, + { (char*) "America/Juneau" , 0x0124B9 }, + { (char*) "America/Kentucky/Louisville" , 0x01289F }, + { (char*) "America/Kentucky/Monticello" , 0x012DA3 }, + { (char*) "America/Knox_IN" , 0x01318F }, + { (char*) "America/Kralendijk" , 0x013593 }, + { (char*) "America/La_Paz" , 0x013650 }, + { (char*) "America/Lima" , 0x013706 }, + { (char*) "America/Los_Angeles" , 0x01382D }, + { (char*) "America/Louisville" , 0x013D4E }, + { (char*) "America/Lower_Princes" , 0x014234 }, + { (char*) "America/Maceio" , 0x0142F1 }, + { (char*) "America/Managua" , 0x014503 }, + { (char*) "America/Manaus" , 0x014636 }, + { (char*) "America/Marigot" , 0x0147ED }, + { (char*) "America/Martinique" , 0x0148AA }, + { (char*) "America/Matamoros" , 0x014968 }, + { (char*) "America/Mazatlan" , 0x014B55 }, + { (char*) "America/Mendoza" , 0x014E45 }, + { (char*) "America/Menominee" , 0x015115 }, + { (char*) "America/Merida" , 0x0154D5 }, + { (char*) "America/Metlakatla" , 0x015780 }, + { (char*) "America/Mexico_City" , 0x0159ED }, + { (char*) "America/Miquelon" , 0x015D0C }, + { (char*) "America/Moncton" , 0x015F3E }, + { (char*) "America/Monterrey" , 0x016537 }, + { (char*) "America/Montevideo" , 0x01683E }, + { (char*) "America/Montreal" , 0x016C13 }, + { (char*) "America/Montserrat" , 0x0172D4 }, + { (char*) "America/Nassau" , 0x017362 }, + { (char*) "America/New_York" , 0x01775C }, + { (char*) "America/Nipigon" , 0x017E4C }, + { (char*) "America/Nome" , 0x01850D }, + { (char*) "America/Noronha" , 0x0188F5 }, + { (char*) "America/North_Dakota/Beulah" , 0x018AF5 }, + { (char*) "America/North_Dakota/Center" , 0x018F29 }, + { (char*) "America/North_Dakota/New_Salem" , 0x019328 }, + { (char*) "America/Nuuk" , 0x01972D }, + { (char*) "America/Ojinaga" , 0x019B0F }, + { (char*) "America/Panama" , 0x019E05 }, + { (char*) "America/Pangnirtung" , 0x019EA6 }, + { (char*) "America/Paramaribo" , 0x01A209 }, + { (char*) "America/Phoenix" , 0x01A2D0 }, + { (char*) "America/Port-au-Prince" , 0x01A3E4 }, + { (char*) "America/Port_of_Spain" , 0x01A625 }, + { (char*) "America/Porto_Acre" , 0x01A6B3 }, + { (char*) "America/Porto_Velho" , 0x01A861 }, + { (char*) "America/Puerto_Rico" , 0x01A9FF }, + { (char*) "America/Punta_Arenas" , 0x01AABC }, + { (char*) "America/Rainy_River" , 0x01AF9B }, + { (char*) "America/Rankin_Inlet" , 0x01B4B5 }, + { (char*) "America/Recife" , 0x01B7FE }, + { (char*) "America/Regina" , 0x01B9F8 }, + { (char*) "America/Resolute" , 0x01BC97 }, + { (char*) "America/Rio_Branco" , 0x01BFE1 }, + { (char*) "America/Rosario" , 0x01C193 }, + { (char*) "America/Santa_Isabel" , 0x01C463 }, + { (char*) "America/Santarem" , 0x01C8A6 }, + { (char*) "America/Santiago" , 0x01CA56 }, + { (char*) "America/Santo_Domingo" , 0x01CFB9 }, + { (char*) "America/Sao_Paulo" , 0x01D102 }, + { (char*) "America/Scoresbysund" , 0x01D4FC }, + { (char*) "America/Shiprock" , 0x01D8FD }, + { (char*) "America/Sitka" , 0x01DD1B }, + { (char*) "America/St_Barthelemy" , 0x01E0F6 }, + { (char*) "America/St_Johns" , 0x01E1B3 }, + { (char*) "America/St_Kitts" , 0x01E930 }, + { (char*) "America/St_Lucia" , 0x01E9BE }, + { (char*) "America/St_Thomas" , 0x01EA5F }, + { (char*) "America/St_Vincent" , 0x01EAED }, + { (char*) "America/Swift_Current" , 0x01EB8E }, + { (char*) "America/Tegucigalpa" , 0x01ED1C }, + { (char*) "America/Thule" , 0x01EDEA }, + { (char*) "America/Thunder_Bay" , 0x01EFCB }, + { (char*) "America/Tijuana" , 0x01F68C }, + { (char*) "America/Toronto" , 0x01FADE }, + { (char*) "America/Tortola" , 0x0201BD }, + { (char*) "America/Vancouver" , 0x02024B }, + { (char*) "America/Virgin" , 0x0207A2 }, + { (char*) "America/Whitehorse" , 0x02085F }, + { (char*) "America/Winnipeg" , 0x020C82 }, + { (char*) "America/Yakutat" , 0x0211B9 }, + { (char*) "America/Yellowknife" , 0x021587 }, + { (char*) "Antarctica/Casey" , 0x02195D }, + { (char*) "Antarctica/Davis" , 0x021A8D }, + { (char*) "Antarctica/DumontDUrville" , 0x021B63 }, + { (char*) "Antarctica/Macquarie" , 0x021C17 }, + { (char*) "Antarctica/Mawson" , 0x022003 }, + { (char*) "Antarctica/McMurdo" , 0x0220AD }, + { (char*) "Antarctica/Palmer" , 0x0223DF }, + { (char*) "Antarctica/Rothera" , 0x022768 }, + { (char*) "Antarctica/South_Pole" , 0x0227FF }, + { (char*) "Antarctica/Syowa" , 0x022C1E }, + { (char*) "Antarctica/Troll" , 0x022CB4 }, + { (char*) "Antarctica/Vostok" , 0x022D63 }, + { (char*) "Arctic/Longyearbyen" , 0x022E1F }, + { (char*) "Asia/Aden" , 0x0230EC }, + { (char*) "Asia/Almaty" , 0x02317D }, + { (char*) "Asia/Amman" , 0x023405 }, + { (char*) "Asia/Anadyr" , 0x0237B1 }, + { (char*) "Asia/Aqtau" , 0x023AB7 }, + { (char*) "Asia/Aqtobe" , 0x023D36 }, + { (char*) "Asia/Ashgabat" , 0x023FB6 }, + { (char*) "Asia/Ashkhabad" , 0x024139 }, + { (char*) "Asia/Atyrau" , 0x0242BC }, + { (char*) "Asia/Baghdad" , 0x024545 }, + { (char*) "Asia/Bahrain" , 0x0247C7 }, + { (char*) "Asia/Baku" , 0x024880 }, + { (char*) "Asia/Bangkok" , 0x024B74 }, + { (char*) "Asia/Barnaul" , 0x024C18 }, + { (char*) "Asia/Beirut" , 0x024F23 }, + { (char*) "Asia/Bishkek" , 0x02520B }, + { (char*) "Asia/Brunei" , 0x025481 }, + { (char*) "Asia/Calcutta" , 0x025527 }, + { (char*) "Asia/Chita" , 0x02560F }, + { (char*) "Asia/Choibalsan" , 0x02591D }, + { (char*) "Asia/Chongqing" , 0x025B7B }, + { (char*) "Asia/Chungking" , 0x025D10 }, + { (char*) "Asia/Colombo" , 0x025EA5 }, + { (char*) "Asia/Dacca" , 0x025FA8 }, + { (char*) "Asia/Damascus" , 0x02609B }, + { (char*) "Asia/Dhaka" , 0x026579 }, + { (char*) "Asia/Dili" , 0x02666C }, + { (char*) "Asia/Dubai" , 0x026722 }, + { (char*) "Asia/Dushanbe" , 0x0267B3 }, + { (char*) "Asia/Famagusta" , 0x02692D }, + { (char*) "Asia/Gaza" , 0x026CF4 }, + { (char*) "Asia/Harbin" , 0x027890 }, + { (char*) "Asia/Hebron" , 0x027A25 }, + { (char*) "Asia/Ho_Chi_Minh" , 0x0285D2 }, + { (char*) "Asia/Hong_Kong" , 0x0286CA }, + { (char*) "Asia/Hovd" , 0x0289DD }, + { (char*) "Asia/Irkutsk" , 0x028C51 }, + { (char*) "Asia/Istanbul" , 0x028F6F }, + { (char*) "Asia/Jakarta" , 0x02942B }, + { (char*) "Asia/Jayapura" , 0x02953C }, + { (char*) "Asia/Jerusalem" , 0x029629 }, + { (char*) "Asia/Kabul" , 0x029A67 }, + { (char*) "Asia/Kamchatka" , 0x029B12 }, + { (char*) "Asia/Karachi" , 0x029E07 }, + { (char*) "Asia/Kashgar" , 0x029F1D }, + { (char*) "Asia/Kathmandu" , 0x029FAE }, + { (char*) "Asia/Katmandu" , 0x02A05B }, + { (char*) "Asia/Khandyga" , 0x02A108 }, + { (char*) "Asia/Kolkata" , 0x02A439 }, + { (char*) "Asia/Krasnoyarsk" , 0x02A521 }, + { (char*) "Asia/Kuala_Lumpur" , 0x02A82B }, + { (char*) "Asia/Kuching" , 0x02A94B }, + { (char*) "Asia/Kuwait" , 0x02AAA5 }, + { (char*) "Asia/Macao" , 0x02AB36 }, + { (char*) "Asia/Macau" , 0x02AE59 }, + { (char*) "Asia/Magadan" , 0x02B17C }, + { (char*) "Asia/Makassar" , 0x02B487 }, + { (char*) "Asia/Manila" , 0x02B59A }, + { (char*) "Asia/Muscat" , 0x02B6B8 }, + { (char*) "Asia/Nicosia" , 0x02B749 }, + { (char*) "Asia/Novokuznetsk" , 0x02B9B8 }, + { (char*) "Asia/Novosibirsk" , 0x02BCAB }, + { (char*) "Asia/Omsk" , 0x02BFBC }, + { (char*) "Asia/Oral" , 0x02C2BA }, + { (char*) "Asia/Phnom_Penh" , 0x02C546 }, + { (char*) "Asia/Pontianak" , 0x02C61A }, + { (char*) "Asia/Pyongyang" , 0x02C733 }, + { (char*) "Asia/Qatar" , 0x02C7F6 }, + { (char*) "Asia/Qostanay" , 0x02C89A }, + { (char*) "Asia/Qyzylorda" , 0x02CB30 }, + { (char*) "Asia/Rangoon" , 0x02CDC9 }, + { (char*) "Asia/Riyadh" , 0x02CE90 }, + { (char*) "Asia/Saigon" , 0x02CF21 }, + { (char*) "Asia/Sakhalin" , 0x02D019 }, + { (char*) "Asia/Samarkand" , 0x02D330 }, + { (char*) "Asia/Seoul" , 0x02D4BB }, + { (char*) "Asia/Shanghai" , 0x02D666 }, + { (char*) "Asia/Singapore" , 0x02D807 }, + { (char*) "Asia/Srednekolymsk" , 0x02D913 }, + { (char*) "Asia/Taipei" , 0x02DC23 }, + { (char*) "Asia/Tashkent" , 0x02DE2E }, + { (char*) "Asia/Tbilisi" , 0x02DFB9 }, + { (char*) "Asia/Tehran" , 0x02E23A }, + { (char*) "Asia/Tel_Aviv" , 0x02E572 }, + { (char*) "Asia/Thimbu" , 0x02E9B0 }, + { (char*) "Asia/Thimphu" , 0x02EA56 }, + { (char*) "Asia/Tokyo" , 0x02EAFC }, + { (char*) "Asia/Tomsk" , 0x02EBDD }, + { (char*) "Asia/Ujung_Pandang" , 0x02EEE8 }, + { (char*) "Asia/Ulaanbaatar" , 0x02EFB2 }, + { (char*) "Asia/Ulan_Bator" , 0x02F220 }, + { (char*) "Asia/Urumqi" , 0x02F47E }, + { (char*) "Asia/Ust-Nera" , 0x02F51C }, + { (char*) "Asia/Vientiane" , 0x02F83F }, + { (char*) "Asia/Vladivostok" , 0x02F925 }, + { (char*) "Asia/Yakutsk" , 0x02FC2A }, + { (char*) "Asia/Yangon" , 0x02FF2E }, + { (char*) "Asia/Yekaterinburg" , 0x02FFF5 }, + { (char*) "Asia/Yerevan" , 0x030307 }, + { (char*) "Atlantic/Azores" , 0x0305D7 }, + { (char*) "Atlantic/Bermuda" , 0x030B62 }, + { (char*) "Atlantic/Canary" , 0x030F6E }, + { (char*) "Atlantic/Cape_Verde" , 0x031166 }, + { (char*) "Atlantic/Faeroe" , 0x031221 }, + { (char*) "Atlantic/Faroe" , 0x0313E6 }, + { (char*) "Atlantic/Jan_Mayen" , 0x0315AB }, + { (char*) "Atlantic/Madeira" , 0x031878 }, + { (char*) "Atlantic/Reykjavik" , 0x031DEF }, + { (char*) "Atlantic/South_Georgia" , 0x0320EC }, + { (char*) "Atlantic/St_Helena" , 0x03217C }, + { (char*) "Atlantic/Stanley" , 0x03221D }, + { (char*) "Australia/ACT" , 0x03253E }, + { (char*) "Australia/Adelaide" , 0x0328D2 }, + { (char*) "Australia/Brisbane" , 0x032C86 }, + { (char*) "Australia/Broken_Hill" , 0x032DCA }, + { (char*) "Australia/Canberra" , 0x03319F }, + { (char*) "Australia/Currie" , 0x033533 }, + { (char*) "Australia/Darwin" , 0x03392A }, + { (char*) "Australia/Eucla" , 0x033A32 }, + { (char*) "Australia/Hobart" , 0x033B91 }, + { (char*) "Australia/LHI" , 0x033F90 }, + { (char*) "Australia/Lindeman" , 0x034250 }, + { (char*) "Australia/Lord_Howe" , 0x0343C0 }, + { (char*) "Australia/Melbourne" , 0x034690 }, + { (char*) "Australia/North" , 0x034A2C }, + { (char*) "Australia/NSW" , 0x034B22 }, + { (char*) "Australia/Perth" , 0x034EB6 }, + { (char*) "Australia/Queensland" , 0x035012 }, + { (char*) "Australia/South" , 0x03513F }, + { (char*) "Australia/Sydney" , 0x0354E4 }, + { (char*) "Australia/Tasmania" , 0x035894 }, + { (char*) "Australia/Victoria" , 0x035C8B }, + { (char*) "Australia/West" , 0x03601F }, + { (char*) "Australia/Yancowinna" , 0x03615D }, + { (char*) "Brazil/Acre" , 0x036516 }, + { (char*) "Brazil/DeNoronha" , 0x0366C4 }, + { (char*) "Brazil/East" , 0x0368B4 }, + { (char*) "Brazil/West" , 0x036C78 }, + { (char*) "Canada/Atlantic" , 0x036E20 }, + { (char*) "Canada/Central" , 0x0374B4 }, + { (char*) "Canada/Eastern" , 0x0379CE }, + { (char*) "Canada/Mountain" , 0x03808F }, + { (char*) "Canada/Newfoundland" , 0x038465 }, + { (char*) "Canada/Pacific" , 0x038BC7 }, + { (char*) "Canada/Saskatchewan" , 0x039105 }, + { (char*) "Canada/Yukon" , 0x03938F }, + { (char*) "CET" , 0x0397A0 }, + { (char*) "Chile/Continental" , 0x039BFB }, + { (char*) "Chile/EasterIsland" , 0x03A151 }, + { (char*) "CST6CDT" , 0x03A5F3 }, + { (char*) "Cuba" , 0x03ACD9 }, + { (char*) "EET" , 0x03B142 }, + { (char*) "Egypt" , 0x03B3F8 }, + { (char*) "Eire" , 0x03B921 }, + { (char*) "EST" , 0x03BF05 }, + { (char*) "EST5EDT" , 0x03BFA6 }, + { (char*) "Etc/GMT" , 0x03C682 }, + { (char*) "Etc/GMT+0" , 0x03C6FD }, + { (char*) "Etc/GMT+1" , 0x03C778 }, + { (char*) "Etc/GMT+10" , 0x03C7F5 }, + { (char*) "Etc/GMT+11" , 0x03C873 }, + { (char*) "Etc/GMT+12" , 0x03C8F1 }, + { (char*) "Etc/GMT+2" , 0x03C96F }, + { (char*) "Etc/GMT+3" , 0x03C9EC }, + { (char*) "Etc/GMT+4" , 0x03CA69 }, + { (char*) "Etc/GMT+5" , 0x03CAE6 }, + { (char*) "Etc/GMT+6" , 0x03CB63 }, + { (char*) "Etc/GMT+7" , 0x03CBE0 }, + { (char*) "Etc/GMT+8" , 0x03CC5D }, + { (char*) "Etc/GMT+9" , 0x03CCDA }, + { (char*) "Etc/GMT-0" , 0x03CD57 }, + { (char*) "Etc/GMT-1" , 0x03CDD2 }, + { (char*) "Etc/GMT-10" , 0x03CE50 }, + { (char*) "Etc/GMT-11" , 0x03CECF }, + { (char*) "Etc/GMT-12" , 0x03CF4E }, + { (char*) "Etc/GMT-13" , 0x03CFCD }, + { (char*) "Etc/GMT-14" , 0x03D04C }, + { (char*) "Etc/GMT-2" , 0x03D0CB }, + { (char*) "Etc/GMT-3" , 0x03D149 }, + { (char*) "Etc/GMT-4" , 0x03D1C7 }, + { (char*) "Etc/GMT-5" , 0x03D245 }, + { (char*) "Etc/GMT-6" , 0x03D2C3 }, + { (char*) "Etc/GMT-7" , 0x03D341 }, + { (char*) "Etc/GMT-8" , 0x03D3BF }, + { (char*) "Etc/GMT-9" , 0x03D43D }, + { (char*) "Etc/GMT0" , 0x03D4BB }, + { (char*) "Etc/Greenwich" , 0x03D536 }, + { (char*) "Etc/UCT" , 0x03D5B1 }, + { (char*) "Etc/Universal" , 0x03D62C }, + { (char*) "Etc/UTC" , 0x03D6A7 }, + { (char*) "Etc/Zulu" , 0x03D722 }, + { (char*) "Europe/Amsterdam" , 0x03D79D }, + { (char*) "Europe/Andorra" , 0x03DBD8 }, + { (char*) "Europe/Astrakhan" , 0x03DD69 }, + { (char*) "Europe/Athens" , 0x03E05D }, + { (char*) "Europe/Belfast" , 0x03E313 }, + { (char*) "Europe/Belgrade" , 0x03E95E }, + { (char*) "Europe/Berlin" , 0x03EB48 }, + { (char*) "Europe/Bratislava" , 0x03EE24 }, + { (char*) "Europe/Brussels" , 0x03F103 }, + { (char*) "Europe/Bucharest" , 0x03F55E }, + { (char*) "Europe/Budapest" , 0x03F7FF }, + { (char*) "Europe/Busingen" , 0x03FB09 }, + { (char*) "Europe/Chisinau" , 0x03FD0E }, + { (char*) "Europe/Copenhagen" , 0x04000D }, + { (char*) "Europe/Dublin" , 0x040288 }, + { (char*) "Europe/Gibraltar" , 0x04086C }, + { (char*) "Europe/Guernsey" , 0x040D3C }, + { (char*) "Europe/Helsinki" , 0x041393 }, + { (char*) "Europe/Isle_of_Man" , 0x041580 }, + { (char*) "Europe/Istanbul" , 0x041BCB }, + { (char*) "Europe/Jersey" , 0x042087 }, + { (char*) "Europe/Kaliningrad" , 0x0426DE }, + { (char*) "Europe/Kiev" , 0x042A86 }, + { (char*) "Europe/Kirov" , 0x042CC0 }, + { (char*) "Europe/Kyiv" , 0x042FB9 }, + { (char*) "Europe/Lisbon" , 0x043202 }, + { (char*) "Europe/Ljubljana" , 0x0437D8 }, + { (char*) "Europe/London" , 0x0439C2 }, + { (char*) "Europe/Luxembourg" , 0x04400D }, + { (char*) "Europe/Madrid" , 0x044458 }, + { (char*) "Europe/Malta" , 0x0447F5 }, + { (char*) "Europe/Mariehamn" , 0x044BA1 }, + { (char*) "Europe/Minsk" , 0x044D8E }, + { (char*) "Europe/Monaco" , 0x0450C2 }, + { (char*) "Europe/Moscow" , 0x045528 }, + { (char*) "Europe/Nicosia" , 0x0458D4 }, + { (char*) "Europe/Oslo" , 0x045B35 }, + { (char*) "Europe/Paris" , 0x045DE5 }, + { (char*) "Europe/Podgorica" , 0x046242 }, + { (char*) "Europe/Prague" , 0x04642C }, + { (char*) "Europe/Riga" , 0x04670B }, + { (char*) "Europe/Rome" , 0x0469CD }, + { (char*) "Europe/Samara" , 0x046D8C }, + { (char*) "Europe/San_Marino" , 0x04708D }, + { (char*) "Europe/Sarajevo" , 0x04744C }, + { (char*) "Europe/Saratov" , 0x047636 }, + { (char*) "Europe/Simferopol" , 0x047928 }, + { (char*) "Europe/Skopje" , 0x047C9B }, + { (char*) "Europe/Sofia" , 0x047E85 }, + { (char*) "Europe/Stockholm" , 0x0480E1 }, + { (char*) "Europe/Tallinn" , 0x0482DE }, + { (char*) "Europe/Tirane" , 0x04858D }, + { (char*) "Europe/Tiraspol" , 0x0487F5 }, + { (char*) "Europe/Ulyanovsk" , 0x048AF4 }, + { (char*) "Europe/Uzhgorod" , 0x048E0A }, + { (char*) "Europe/Vaduz" , 0x049044 }, + { (char*) "Europe/Vatican" , 0x04922E }, + { (char*) "Europe/Vienna" , 0x0495ED }, + { (char*) "Europe/Vilnius" , 0x04988B }, + { (char*) "Europe/Volgograd" , 0x049B3B }, + { (char*) "Europe/Warsaw" , 0x049E4A }, + { (char*) "Europe/Zagreb" , 0x04A1F1 }, + { (char*) "Europe/Zaporozhye" , 0x04A3DB }, + { (char*) "Europe/Zurich" , 0x04A615 }, + { (char*) "Factory" , 0x04A812 }, + { (char*) "GB" , 0x04A88F }, + { (char*) "GB-Eire" , 0x04AEDA }, + { (char*) "GMT" , 0x04B525 }, + { (char*) "GMT+0" , 0x04B5A0 }, + { (char*) "GMT-0" , 0x04B61B }, + { (char*) "GMT0" , 0x04B696 }, + { (char*) "Greenwich" , 0x04B711 }, + { (char*) "Hongkong" , 0x04B78C }, + { (char*) "HST" , 0x04BA9F }, + { (char*) "Iceland" , 0x04BB88 }, + { (char*) "Indian/Antananarivo" , 0x04BC16 }, + { (char*) "Indian/Chagos" , 0x04BCC2 }, + { (char*) "Indian/Christmas" , 0x04BD66 }, + { (char*) "Indian/Cocos" , 0x04BDF7 }, + { (char*) "Indian/Comoro" , 0x04BE8F }, + { (char*) "Indian/Kerguelen" , 0x04BF1E }, + { (char*) "Indian/Mahe" , 0x04BFAF }, + { (char*) "Indian/Maldives" , 0x04C040 }, + { (char*) "Indian/Mauritius" , 0x04C0E4 }, + { (char*) "Indian/Mayotte" , 0x04C1A3 }, + { (char*) "Indian/Reunion" , 0x04C232 }, + { (char*) "Iran" , 0x04C2C3 }, + { (char*) "Israel" , 0x04C5FB }, + { (char*) "Jamaica" , 0x04CA39 }, + { (char*) "Japan" , 0x04CB98 }, + { (char*) "Kwajalein" , 0x04CC79 }, + { (char*) "Libya" , 0x04CD60 }, + { (char*) "MET" , 0x04CF1B }, + { (char*) "Mexico/BajaNorte" , 0x04D376 }, + { (char*) "Mexico/BajaSur" , 0x04D7B9 }, + { (char*) "Mexico/General" , 0x04DA77 }, + { (char*) "MST" , 0x04DD88 }, + { (char*) "MST7MDT" , 0x04DE84 }, + { (char*) "Navajo" , 0x04E2A2 }, + { (char*) "NZ" , 0x04E6C0 }, + { (char*) "NZ-CHAT" , 0x04EADF }, + { (char*) "Pacific/Apia" , 0x04EE13 }, + { (char*) "Pacific/Auckland" , 0x04EFB6 }, + { (char*) "Pacific/Bougainville" , 0x04F3E8 }, + { (char*) "Pacific/Chatham" , 0x04F4C9 }, + { (char*) "Pacific/Chuuk" , 0x04F80C }, + { (char*) "Pacific/Easter" , 0x04F8EA }, + { (char*) "Pacific/Efate" , 0x04FD99 }, + { (char*) "Pacific/Enderbury" , 0x04FEFB }, + { (char*) "Pacific/Fakaofo" , 0x04FFB3 }, + { (char*) "Pacific/Fiji" , 0x050058 }, + { (char*) "Pacific/Funafuti" , 0x0501F0 }, + { (char*) "Pacific/Galapagos" , 0x050282 }, + { (char*) "Pacific/Gambier" , 0x05034E }, + { (char*) "Pacific/Guadalcanal" , 0x0503ED }, + { (char*) "Pacific/Guam" , 0x05047F }, + { (char*) "Pacific/Honolulu" , 0x0505E9 }, + { (char*) "Pacific/Johnston" , 0x0506D8 }, + { (char*) "Pacific/Kanton" , 0x0507C1 }, + { (char*) "Pacific/Kiritimati" , 0x050888 }, + { (char*) "Pacific/Kosrae" , 0x05094E }, + { (char*) "Pacific/Kwajalein" , 0x050A52 }, + { (char*) "Pacific/Majuro" , 0x050B42 }, + { (char*) "Pacific/Marquesas" , 0x050C40 }, + { (char*) "Pacific/Midway" , 0x050CE8 }, + { (char*) "Pacific/Nauru" , 0x050DAB }, + { (char*) "Pacific/Niue" , 0x050E6E }, + { (char*) "Pacific/Norfolk" , 0x050F14 }, + { (char*) "Pacific/Noumea" , 0x05100D }, + { (char*) "Pacific/Pago_Pago" , 0x0510DF }, + { (char*) "Pacific/Palau" , 0x05117D }, + { (char*) "Pacific/Pitcairn" , 0x05121D }, + { (char*) "Pacific/Pohnpei" , 0x0512C2 }, + { (char*) "Pacific/Ponape" , 0x0513B2 }, + { (char*) "Pacific/Port_Moresby" , 0x051444 }, + { (char*) "Pacific/Rarotonga" , 0x051502 }, + { (char*) "Pacific/Saipan" , 0x0516A4 }, + { (char*) "Pacific/Samoa" , 0x051805 }, + { (char*) "Pacific/Tahiti" , 0x0518A3 }, + { (char*) "Pacific/Tarawa" , 0x051943 }, + { (char*) "Pacific/Tongatapu" , 0x0519E4 }, + { (char*) "Pacific/Truk" , 0x051ADD }, + { (char*) "Pacific/Wake" , 0x051B83 }, + { (char*) "Pacific/Wallis" , 0x051C20 }, + { (char*) "Pacific/Yap" , 0x051CB2 }, + { (char*) "Poland" , 0x051D58 }, + { (char*) "Portugal" , 0x0520FF }, + { (char*) "PRC" , 0x0526C2 }, + { (char*) "PST8PDT" , 0x052857 }, + { (char*) "ROC" , 0x052D71 }, + { (char*) "ROK" , 0x052F7C }, + { (char*) "Singapore" , 0x053127 }, + { (char*) "Turkey" , 0x053233 }, + { (char*) "UCT" , 0x0536EF }, + { (char*) "Universal" , 0x05376A }, + { (char*) "US/Alaska" , 0x0537E5 }, + { (char*) "US/Aleutian" , 0x053BC2 }, + { (char*) "US/Arizona" , 0x053F97 }, + { (char*) "US/Central" , 0x054093 }, + { (char*) "US/East-Indiana" , 0x054779 }, + { (char*) "US/Eastern" , 0x054998 }, + { (char*) "US/Hawaii" , 0x055074 }, + { (char*) "US/Indiana-Starke" , 0x05515D }, + { (char*) "US/Michigan" , 0x055561 }, + { (char*) "US/Mountain" , 0x0558F0 }, + { (char*) "US/Pacific" , 0x055D0E }, + { (char*) "US/Samoa" , 0x056228 }, + { (char*) "UTC" , 0x0562C6 }, + { (char*) "W-SU" , 0x056341 }, + { (char*) "WET" , 0x0566D9 }, + { (char*) "Zulu" , 0x056C9C }, }; -const unsigned char timelib_timezone_db_data_builtin[354224] = { +const unsigned char timelib_timezone_db_data_builtin[355607] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3709,6 +3710,95 @@ const unsigned char timelib_timezone_db_data_builtin[354224] = { 0x54, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A, 0x00, 0x98, 0x7C, 0x75, 0x00, 0x92, 0x5B, 0x72, 0x00, 0x00, 0x00, 0x00, +/* America/Coyhaique */ +0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0xFF, +0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0x30, 0x47, 0x45, 0xFF, +0xFF, 0xFF, 0xFF, 0x9B, 0x5C, 0xE5, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x7C, 0xE2, 0xC5, 0xFF, +0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x71, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x5E, 0x77, 0xC5, 0xFF, +0xFF, 0xFF, 0xFF, 0xB1, 0x77, 0x3D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x41, 0x00, 0xD0, 0xFF, +0xFF, 0xFF, 0xFF, 0xB3, 0x58, 0x70, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x22, 0x34, 0x50, 0xFF, +0xFF, 0xFF, 0xFF, 0xB5, 0x39, 0xA4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x03, 0x67, 0xD0, 0xFF, +0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xE4, 0x9B, 0x50, 0xFF, +0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xC7, 0x20, 0x50, 0xFF, +0xFF, 0xFF, 0xFF, 0xCC, 0x1C, 0x6E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x6C, 0xE7, 0xD0, 0xFF, +0xFF, 0xFF, 0xFF, 0xD4, 0x17, 0xE3, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x33, 0x55, 0xC0, 0xFF, +0xFF, 0xFF, 0xFF, 0xD5, 0x76, 0x92, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, +0xFF, 0xFF, 0xFF, 0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x02, 0x40, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x04, 0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, +0x00, 0x00, 0x00, 0x06, 0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, +0x00, 0x00, 0x00, 0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, +0x00, 0x00, 0x00, 0x09, 0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, +0x00, 0x00, 0x00, 0x0B, 0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, +0x00, 0x00, 0x00, 0x0D, 0x88, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, +0x00, 0x00, 0x00, 0x0F, 0x68, 0xB2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x11, 0x48, 0x94, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x13, 0x28, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x15, 0x11, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x16, 0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, +0x00, 0x00, 0x00, 0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, +0x00, 0x00, 0x00, 0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, +0x00, 0x00, 0x00, 0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, +0x00, 0x00, 0x00, 0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, +0x00, 0x00, 0x00, 0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, +0x00, 0x00, 0x00, 0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, +0x00, 0x00, 0x00, 0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, +0x00, 0x00, 0x00, 0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, +0x00, 0x00, 0x00, 0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, +0x00, 0x00, 0x00, 0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, +0x00, 0x00, 0x00, 0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, +0x00, 0x00, 0x00, 0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, +0x00, 0x00, 0x00, 0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, +0x00, 0x00, 0x00, 0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, +0x00, 0x00, 0x00, 0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, +0x00, 0x00, 0x00, 0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, +0x00, 0x00, 0x00, 0x57, 0x37, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x57, 0xAF, 0xEC, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x59, 0x17, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0x8F, 0xCE, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x5A, 0xF7, 0xAA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x6F, 0xB0, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x5C, 0xA9, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x74, 0x7C, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x5E, 0x89, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x54, 0x5E, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x60, 0x69, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x34, 0x40, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x62, 0x49, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x1D, 0x5D, 0x40, 0x00, +0x00, 0x00, 0x00, 0x64, 0x28, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0xF4, 0x04, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x66, 0x12, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x66, 0xDD, 0x21, 0x40, 0x00, +0x00, 0x00, 0x00, 0x67, 0xDB, 0x84, 0xB0, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x04, 0x02, 0x03, 0x05, 0x03, 0x05, 0x03, +0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, +0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, +0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, +0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, +0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, +0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, +0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x06, 0xFF, 0xFF, 0xBC, 0x70, +0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBB, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, +0xC7, 0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, +0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x2D, 0x30, +0x35, 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, +0x33, 0x0A, 0x00, 0x43, 0xCC, 0xC5, 0x00, 0xA4, 0xB1, 0x75, 0x00, 0x00, 0x00, 0x0C, 0x41, 0x79, +0x73, 0x65, 0x6E, 0x20, 0x52, 0x65, 0x67, 0x69, 0x6F, 0x6E, + /* America/Creston */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7899,9 +7989,8 @@ const unsigned char timelib_timezone_db_data_builtin[354224] = { 0xC7, 0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x35, 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, -0x33, 0x0A, 0x00, 0x38, 0x3A, 0x88, 0x00, 0xA6, 0x72, 0xAD, 0x00, 0x00, 0x00, 0x14, 0x52, 0x65, -0x67, 0x69, 0x6F, 0x6E, 0x20, 0x6F, 0x66, 0x20, 0x4D, 0x61, 0x67, 0x61, 0x6C, 0x6C, 0x61, 0x6E, -0x65, 0x73, +0x33, 0x0A, 0x00, 0x38, 0x3A, 0x88, 0x00, 0xA6, 0x72, 0xAD, 0x00, 0x00, 0x00, 0x11, 0x4D, 0x61, +0x67, 0x61, 0x6C, 0x6C, 0x61, 0x6E, 0x65, 0x73, 0x20, 0x52, 0x65, 0x67, 0x69, 0x6F, 0x6E, /* America/Rainy_River */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -13146,7 +13235,7 @@ const unsigned char timelib_timezone_db_data_builtin[354224] = { 0xFF, 0xFF, 0xFF, 0x9A, 0x6C, 0x7D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x00, 0xCC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x94, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xAD, 0x13, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x79, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0xCA, 0xC0, 0x00, -0x00, 0x00, 0x00, 0x10, 0xED, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xBC, 0x48, 0x00, +0x00, 0x00, 0x00, 0x10, 0xA9, 0xFD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xBC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x12, 0x45, 0x4A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x37, 0xEC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x14, 0x2D, 0x15, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x76, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x28, 0xDB, 0x9D, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x29, 0xCB, 0x9C, 0xC8, 0x00, @@ -21311,7 +21400,7 @@ const unsigned char timelib_timezone_db_data_builtin[354224] = { 0xFF, 0xFF, 0xFF, 0x9A, 0x6C, 0x7D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x00, 0xCC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x94, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xAD, 0x13, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x79, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0xCA, 0xC0, 0x00, -0x00, 0x00, 0x00, 0x10, 0xED, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xBC, 0x48, 0x00, +0x00, 0x00, 0x00, 0x10, 0xA9, 0xFD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xBC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x12, 0x45, 0x4A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x37, 0xEC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x14, 0x2D, 0x15, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x76, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x28, 0xDB, 0x9D, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x29, 0xCB, 0x9C, 0xC8, 0x00, @@ -24240,7 +24329,7 @@ const unsigned char timelib_timezone_db_data_builtin[354224] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #else -const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { +const timelib_tzdb_index_entry timezonedb_idx_builtin[598] = { { (char*) "Africa/Abidjan" , 0x000000 }, { (char*) "Africa/Accra" , 0x0000A0 }, { (char*) "Africa/Addis_Ababa" , 0x0004D0 }, @@ -24340,508 +24429,509 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "America/Coral_Harbour" , 0x0114AF }, { (char*) "America/Cordoba" , 0x011571 }, { (char*) "America/Costa_Rica" , 0x0119A3 }, - { (char*) "America/Creston" , 0x011AEB }, - { (char*) "America/Cuiaba" , 0x011BD9 }, - { (char*) "America/Curacao" , 0x01216A }, - { (char*) "America/Danmarkshavn" , 0x012230 }, - { (char*) "America/Dawson" , 0x012510 }, - { (char*) "America/Dawson_Creek" , 0x012B7C }, - { (char*) "America/Denver" , 0x012FC2 }, - { (char*) "America/Detroit" , 0x01397F }, - { (char*) "America/Dominica" , 0x01425A }, - { (char*) "America/Edmonton" , 0x0142FA }, - { (char*) "America/Eirunepe" , 0x014C44 }, - { (char*) "America/El_Salvador" , 0x014EE1 }, - { (char*) "America/Ensenada" , 0x014FCD }, - { (char*) "America/Fort_Nelson" , 0x015973 }, - { (char*) "America/Fort_Wayne" , 0x016253 }, - { (char*) "America/Fortaleza" , 0x0168F1 }, - { (char*) "America/Glace_Bay" , 0x016BE1 }, - { (char*) "America/Godthab" , 0x017498 }, - { (char*) "America/Goose_Bay" , 0x017C05 }, - { (char*) "America/Grand_Turk" , 0x0188BB }, - { (char*) "America/Grenada" , 0x018FF1 }, - { (char*) "America/Guadeloupe" , 0x019091 }, - { (char*) "America/Guatemala" , 0x019131 }, - { (char*) "America/Guayaquil" , 0x019255 }, - { (char*) "America/Guyana" , 0x01935B }, - { (char*) "America/Halifax" , 0x01945F }, - { (char*) "America/Havana" , 0x01A1E9 }, - { (char*) "America/Hermosillo" , 0x01AB65 }, - { (char*) "America/Indiana/Indianapolis" , 0x01ACFB }, - { (char*) "America/Indiana/Knox" , 0x01B3B2 }, - { (char*) "America/Indiana/Marengo" , 0x01BD5F }, - { (char*) "America/Indiana/Petersburg" , 0x01C44C }, - { (char*) "America/Indiana/Tell_City" , 0x01CBEB }, - { (char*) "America/Indiana/Vevay" , 0x01D2AF }, - { (char*) "America/Indiana/Vincennes" , 0x01D86B }, - { (char*) "America/Indiana/Winamac" , 0x01DF41 }, - { (char*) "America/Indianapolis" , 0x01E665 }, - { (char*) "America/Inuvik" , 0x01ED03 }, - { (char*) "America/Iqaluit" , 0x01F53D }, - { (char*) "America/Jamaica" , 0x01FDFC }, - { (char*) "America/Jujuy" , 0x01FFEA }, - { (char*) "America/Juneau" , 0x020400 }, - { (char*) "America/Kentucky/Louisville" , 0x020D51 }, - { (char*) "America/Kentucky/Monticello" , 0x02185F }, - { (char*) "America/Knox_IN" , 0x0221BF }, - { (char*) "America/Kralendijk" , 0x022B57 }, - { (char*) "America/La_Paz" , 0x022C59 }, - { (char*) "America/Lima" , 0x022D3F }, - { (char*) "America/Los_Angeles" , 0x022ED3 }, - { (char*) "America/Louisville" , 0x023A0A }, - { (char*) "America/Lower_Princes" , 0x0244FA }, - { (char*) "America/Maceio" , 0x0245FC }, - { (char*) "America/Managua" , 0x0248F2 }, - { (char*) "America/Manaus" , 0x024AAC }, - { (char*) "America/Marigot" , 0x024D15 }, - { (char*) "America/Martinique" , 0x024E17 }, - { (char*) "America/Matamoros" , 0x024F0B }, - { (char*) "America/Mazatlan" , 0x0254CD }, - { (char*) "America/Mendoza" , 0x02592F }, - { (char*) "America/Menominee" , 0x025D61 }, - { (char*) "America/Merida" , 0x02666E }, - { (char*) "America/Metlakatla" , 0x026A77 }, - { (char*) "America/Mexico_City" , 0x027029 }, - { (char*) "America/Miquelon" , 0x027509 }, - { (char*) "America/Moncton" , 0x027B89 }, - { (char*) "America/Monterrey" , 0x0287FF }, - { (char*) "America/Montevideo" , 0x028C9B }, - { (char*) "America/Montreal" , 0x02927F }, - { (char*) "America/Montserrat" , 0x02A031 }, - { (char*) "America/Nassau" , 0x02A0D1 }, - { (char*) "America/New_York" , 0x02AA31 }, - { (char*) "America/Nipigon" , 0x02B831 }, - { (char*) "America/Nome" , 0x02C5E3 }, - { (char*) "America/Noronha" , 0x02CF3B }, - { (char*) "America/North_Dakota/Beulah" , 0x02D215 }, - { (char*) "America/North_Dakota/Center" , 0x02DB92 }, - { (char*) "America/North_Dakota/New_Salem" , 0x02E50F }, - { (char*) "America/Nuuk" , 0x02EE92 }, - { (char*) "America/Ojinaga" , 0x02F610 }, - { (char*) "America/Panama" , 0x02FC2C }, - { (char*) "America/Pangnirtung" , 0x02FCEE }, - { (char*) "America/Paramaribo" , 0x030594 }, - { (char*) "America/Phoenix" , 0x030698 }, - { (char*) "America/Port-au-Prince" , 0x030824 }, - { (char*) "America/Port_of_Spain" , 0x030DCA }, - { (char*) "America/Porto_Acre" , 0x030E6A }, - { (char*) "America/Porto_Velho" , 0x0310DC }, - { (char*) "America/Puerto_Rico" , 0x031322 }, - { (char*) "America/Punta_Arenas" , 0x031424 }, - { (char*) "America/Rainy_River" , 0x031BB2 }, - { (char*) "America/Rankin_Inlet" , 0x0326F2 }, - { (char*) "America/Recife" , 0x032F26 }, - { (char*) "America/Regina" , 0x0331FA }, - { (char*) "America/Resolute" , 0x0335EF }, - { (char*) "America/Rio_Branco" , 0x033E24 }, - { (char*) "America/Rosario" , 0x03409A }, - { (char*) "America/Santa_Isabel" , 0x0344CC }, - { (char*) "America/Santarem" , 0x034E72 }, - { (char*) "America/Santiago" , 0x0350D5 }, - { (char*) "America/Santo_Domingo" , 0x035AC1 }, - { (char*) "America/Sao_Paulo" , 0x035C97 }, - { (char*) "America/Scoresbysund" , 0x03626F }, - { (char*) "America/Shiprock" , 0x036A27 }, - { (char*) "America/Sitka" , 0x0373CF }, - { (char*) "America/St_Barthelemy" , 0x037D07 }, - { (char*) "America/St_Johns" , 0x037E09 }, - { (char*) "America/St_Kitts" , 0x038C77 }, - { (char*) "America/St_Lucia" , 0x038D17 }, - { (char*) "America/St_Thomas" , 0x038DD9 }, - { (char*) "America/St_Vincent" , 0x038E79 }, - { (char*) "America/Swift_Current" , 0x038F3B }, - { (char*) "America/Tegucigalpa" , 0x039189 }, - { (char*) "America/Thule" , 0x039291 }, - { (char*) "America/Thunder_Bay" , 0x039889 }, - { (char*) "America/Tijuana" , 0x03A63B }, - { (char*) "America/Toronto" , 0x03AFF0 }, - { (char*) "America/Tortola" , 0x03BDC0 }, - { (char*) "America/Vancouver" , 0x03BE60 }, - { (char*) "America/Virgin" , 0x03C9D1 }, - { (char*) "America/Whitehorse" , 0x03CAD3 }, - { (char*) "America/Winnipeg" , 0x03D13F }, - { (char*) "America/Yakutat" , 0x03DC9C }, - { (char*) "America/Yellowknife" , 0x03E5B9 }, - { (char*) "Antarctica/Casey" , 0x03EEE1 }, - { (char*) "Antarctica/Davis" , 0x03F099 }, - { (char*) "Antarctica/DumontDUrville" , 0x03F1C5 }, - { (char*) "Antarctica/Macquarie" , 0x03F295 }, - { (char*) "Antarctica/Mawson" , 0x03FB85 }, - { (char*) "Antarctica/McMurdo" , 0x03FC50 }, - { (char*) "Antarctica/Palmer" , 0x04044B }, - { (char*) "Antarctica/Rothera" , 0x0409D9 }, - { (char*) "Antarctica/South_Pole" , 0x040A82 }, - { (char*) "Antarctica/Syowa" , 0x041413 }, - { (char*) "Antarctica/Troll" , 0x0414BB }, - { (char*) "Antarctica/Vostok" , 0x041948 }, - { (char*) "Arctic/Longyearbyen" , 0x041A2F }, - { (char*) "Asia/Aden" , 0x042335 }, - { (char*) "Asia/Almaty" , 0x0423D8 }, - { (char*) "Asia/Amman" , 0x0427CD }, - { (char*) "Asia/Anadyr" , 0x042D72 }, - { (char*) "Asia/Aqtau" , 0x043227 }, - { (char*) "Asia/Aqtobe" , 0x043611 }, - { (char*) "Asia/Ashgabat" , 0x043A0F }, - { (char*) "Asia/Ashkhabad" , 0x043C78 }, - { (char*) "Asia/Atyrau" , 0x043EE1 }, - { (char*) "Asia/Baghdad" , 0x0442D3 }, - { (char*) "Asia/Bahrain" , 0x0446A8 }, - { (char*) "Asia/Baku" , 0x044793 }, - { (char*) "Asia/Bangkok" , 0x044C5C }, - { (char*) "Asia/Barnaul" , 0x044D21 }, - { (char*) "Asia/Beirut" , 0x0451F2 }, - { (char*) "Asia/Bishkek" , 0x045A68 }, - { (char*) "Asia/Brunei" , 0x045E3D }, - { (char*) "Asia/Calcutta" , 0x045F06 }, - { (char*) "Asia/Chita" , 0x04602F }, - { (char*) "Asia/Choibalsan" , 0x046506 }, - { (char*) "Asia/Chongqing" , 0x04687F }, - { (char*) "Asia/Chungking" , 0x046ABC }, - { (char*) "Asia/Colombo" , 0x046CF9 }, - { (char*) "Asia/Dacca" , 0x046E6B }, - { (char*) "Asia/Damascus" , 0x046FBA }, - { (char*) "Asia/Dhaka" , 0x047717 }, - { (char*) "Asia/Dili" , 0x047866 }, - { (char*) "Asia/Dubai" , 0x047973 }, - { (char*) "Asia/Dushanbe" , 0x047A16 }, - { (char*) "Asia/Famagusta" , 0x047C63 }, - { (char*) "Asia/Gaza" , 0x04846A }, - { (char*) "Asia/Harbin" , 0x049384 }, - { (char*) "Asia/Hebron" , 0x0495C1 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x04A4F6 }, - { (char*) "Asia/Hong_Kong" , 0x04A653 }, - { (char*) "Asia/Hovd" , 0x04AB30 }, - { (char*) "Asia/Irkutsk" , 0x04AEBF }, - { (char*) "Asia/Istanbul" , 0x04B3B2 }, - { (char*) "Asia/Jakarta" , 0x04BB4B }, - { (char*) "Asia/Jayapura" , 0x04BCE3 }, - { (char*) "Asia/Jerusalem" , 0x04BE02 }, - { (char*) "Asia/Kabul" , 0x04C762 }, - { (char*) "Asia/Kamchatka" , 0x04C830 }, - { (char*) "Asia/Karachi" , 0x04CCCE }, - { (char*) "Asia/Kashgar" , 0x04CE55 }, - { (char*) "Asia/Kathmandu" , 0x04CEF8 }, - { (char*) "Asia/Katmandu" , 0x04CFCA }, - { (char*) "Asia/Khandyga" , 0x04D09C }, - { (char*) "Asia/Kolkata" , 0x04D5AF }, - { (char*) "Asia/Krasnoyarsk" , 0x04D6D8 }, - { (char*) "Asia/Kuala_Lumpur" , 0x04DBA6 }, - { (char*) "Asia/Kuching" , 0x04DD57 }, - { (char*) "Asia/Kuwait" , 0x04DF46 }, - { (char*) "Asia/Macao" , 0x04DFE9 }, - { (char*) "Asia/Macau" , 0x04E4C0 }, - { (char*) "Asia/Magadan" , 0x04E997 }, - { (char*) "Asia/Makassar" , 0x04EE6B }, - { (char*) "Asia/Manila" , 0x04EFBE }, - { (char*) "Asia/Muscat" , 0x04F170 }, - { (char*) "Asia/Nicosia" , 0x04F213 }, - { (char*) "Asia/Novokuznetsk" , 0x04F9FF }, - { (char*) "Asia/Novosibirsk" , 0x04FE9B }, - { (char*) "Asia/Omsk" , 0x050372 }, - { (char*) "Asia/Oral" , 0x050834 }, - { (char*) "Asia/Phnom_Penh" , 0x050C2E }, - { (char*) "Asia/Pontianak" , 0x050D53 }, - { (char*) "Asia/Pyongyang" , 0x050ED6 }, - { (char*) "Asia/Qatar" , 0x050FCF }, - { (char*) "Asia/Qostanay" , 0x051094 }, - { (char*) "Asia/Qyzylorda" , 0x0514BB }, - { (char*) "Asia/Rangoon" , 0x0518D7 }, - { (char*) "Asia/Riyadh" , 0x0519E1 }, - { (char*) "Asia/Saigon" , 0x051A84 }, - { (char*) "Asia/Sakhalin" , 0x051BE1 }, - { (char*) "Asia/Samarkand" , 0x0520A9 }, - { (char*) "Asia/Seoul" , 0x0522F9 }, - { (char*) "Asia/Shanghai" , 0x05256E }, - { (char*) "Asia/Singapore" , 0x0527B7 }, - { (char*) "Asia/Srednekolymsk" , 0x052954 }, - { (char*) "Asia/Taipei" , 0x052E28 }, - { (char*) "Asia/Tashkent" , 0x05312D }, - { (char*) "Asia/Tbilisi" , 0x05338B }, - { (char*) "Asia/Tehran" , 0x053794 }, - { (char*) "Asia/Tel_Aviv" , 0x053C80 }, - { (char*) "Asia/Thimbu" , 0x0545E0 }, - { (char*) "Asia/Thimphu" , 0x0546A9 }, - { (char*) "Asia/Tokyo" , 0x054772 }, - { (char*) "Asia/Tomsk" , 0x0548B3 }, - { (char*) "Asia/Ujung_Pandang" , 0x054D84 }, - { (char*) "Asia/Ulaanbaatar" , 0x054E8E }, - { (char*) "Asia/Ulan_Bator" , 0x055217 }, - { (char*) "Asia/Urumqi" , 0x055590 }, - { (char*) "Asia/Ust-Nera" , 0x055640 }, - { (char*) "Asia/Vientiane" , 0x055B36 }, - { (char*) "Asia/Vladivostok" , 0x055C77 }, - { (char*) "Asia/Yakutsk" , 0x056140 }, - { (char*) "Asia/Yangon" , 0x056608 }, - { (char*) "Asia/Yekaterinburg" , 0x056712 }, - { (char*) "Asia/Yerevan" , 0x056BF9 }, - { (char*) "Atlantic/Azores" , 0x057076 }, - { (char*) "Atlantic/Bermuda" , 0x057DFA }, - { (char*) "Atlantic/Canary" , 0x058762 }, - { (char*) "Atlantic/Cape_Verde" , 0x058EE5 }, - { (char*) "Atlantic/Faeroe" , 0x058FF1 }, - { (char*) "Atlantic/Faroe" , 0x059714 }, - { (char*) "Atlantic/Jan_Mayen" , 0x059E37 }, - { (char*) "Atlantic/Madeira" , 0x05A73D }, - { (char*) "Atlantic/Reykjavik" , 0x05B489 }, - { (char*) "Atlantic/South_Georgia" , 0x05B91F }, - { (char*) "Atlantic/St_Helena" , 0x05B9C1 }, - { (char*) "Atlantic/Stanley" , 0x05BA83 }, - { (char*) "Australia/ACT" , 0x05BF3F }, - { (char*) "Australia/Adelaide" , 0x05C7D9 }, - { (char*) "Australia/Brisbane" , 0x05D094 }, - { (char*) "Australia/Broken_Hill" , 0x05D25A }, - { (char*) "Australia/Canberra" , 0x05DB37 }, - { (char*) "Australia/Currie" , 0x05E3D1 }, - { (char*) "Australia/Darwin" , 0x05ED13 }, - { (char*) "Australia/Eucla" , 0x05EE76 }, - { (char*) "Australia/Hobart" , 0x05F063 }, - { (char*) "Australia/LHI" , 0x05F9AD }, - { (char*) "Australia/Lindeman" , 0x0600EF }, - { (char*) "Australia/Lord_Howe" , 0x0602F5 }, - { (char*) "Australia/Melbourne" , 0x060A47 }, - { (char*) "Australia/North" , 0x0612E9 }, - { (char*) "Australia/NSW" , 0x06143A }, - { (char*) "Australia/Perth" , 0x061CD4 }, - { (char*) "Australia/Queensland" , 0x061EBC }, - { (char*) "Australia/South" , 0x06206B }, - { (char*) "Australia/Sydney" , 0x062917 }, - { (char*) "Australia/Tasmania" , 0x0631CD }, - { (char*) "Australia/Victoria" , 0x063B0F }, - { (char*) "Australia/West" , 0x0643A9 }, - { (char*) "Australia/Yancowinna" , 0x064573 }, - { (char*) "Brazil/Acre" , 0x064E34 }, - { (char*) "Brazil/DeNoronha" , 0x0650A6 }, - { (char*) "Brazil/East" , 0x065370 }, - { (char*) "Brazil/West" , 0x065912 }, - { (char*) "Canada/Atlantic" , 0x065B6C }, - { (char*) "Canada/Central" , 0x0668D8 }, - { (char*) "Canada/Eastern" , 0x067418 }, - { (char*) "Canada/Mountain" , 0x0681CA }, - { (char*) "Canada/Newfoundland" , 0x068AF2 }, - { (char*) "Canada/Pacific" , 0x069945 }, - { (char*) "Canada/Saskatchewan" , 0x06A49D }, - { (char*) "Canada/Yukon" , 0x06A87D }, - { (char*) "CET" , 0x06AED7 }, - { (char*) "Chile/Continental" , 0x06BA58 }, - { (char*) "Chile/EasterIsland" , 0x06C437 }, - { (char*) "CST6CDT" , 0x06CCEE }, - { (char*) "Cuba" , 0x06DB02 }, - { (char*) "EET" , 0x06E47E }, - { (char*) "Egypt" , 0x06ED60 }, - { (char*) "Eire" , 0x06F6CB }, - { (char*) "EST" , 0x07047B }, - { (char*) "EST5EDT" , 0x07053D }, - { (char*) "Etc/GMT" , 0x071329 }, - { (char*) "Etc/GMT+0" , 0x0713A7 }, - { (char*) "Etc/GMT+1" , 0x071425 }, - { (char*) "Etc/GMT+10" , 0x0714A5 }, - { (char*) "Etc/GMT+11" , 0x071526 }, - { (char*) "Etc/GMT+12" , 0x0715A7 }, - { (char*) "Etc/GMT+2" , 0x071628 }, - { (char*) "Etc/GMT+3" , 0x0716A8 }, - { (char*) "Etc/GMT+4" , 0x071728 }, - { (char*) "Etc/GMT+5" , 0x0717A8 }, - { (char*) "Etc/GMT+6" , 0x071828 }, - { (char*) "Etc/GMT+7" , 0x0718A8 }, - { (char*) "Etc/GMT+8" , 0x071928 }, - { (char*) "Etc/GMT+9" , 0x0719A8 }, - { (char*) "Etc/GMT-0" , 0x071A28 }, - { (char*) "Etc/GMT-1" , 0x071AA6 }, - { (char*) "Etc/GMT-10" , 0x071B27 }, - { (char*) "Etc/GMT-11" , 0x071BA9 }, - { (char*) "Etc/GMT-12" , 0x071C2B }, - { (char*) "Etc/GMT-13" , 0x071CAD }, - { (char*) "Etc/GMT-14" , 0x071D2F }, - { (char*) "Etc/GMT-2" , 0x071DB1 }, - { (char*) "Etc/GMT-3" , 0x071E32 }, - { (char*) "Etc/GMT-4" , 0x071EB3 }, - { (char*) "Etc/GMT-5" , 0x071F34 }, - { (char*) "Etc/GMT-6" , 0x071FB5 }, - { (char*) "Etc/GMT-7" , 0x072036 }, - { (char*) "Etc/GMT-8" , 0x0720B7 }, - { (char*) "Etc/GMT-9" , 0x072138 }, - { (char*) "Etc/GMT0" , 0x0721B9 }, - { (char*) "Etc/Greenwich" , 0x072237 }, - { (char*) "Etc/UCT" , 0x0722B5 }, - { (char*) "Etc/Universal" , 0x072333 }, - { (char*) "Etc/UTC" , 0x0723B1 }, - { (char*) "Etc/Zulu" , 0x07242F }, - { (char*) "Europe/Amsterdam" , 0x0724AD }, - { (char*) "Europe/Andorra" , 0x073017 }, - { (char*) "Europe/Astrakhan" , 0x0736F1 }, - { (char*) "Europe/Athens" , 0x073B8E }, - { (char*) "Europe/Belfast" , 0x074470 }, - { (char*) "Europe/Belgrade" , 0x0752CC }, - { (char*) "Europe/Berlin" , 0x075A58 }, - { (char*) "Europe/Bratislava" , 0x07636D }, - { (char*) "Europe/Brussels" , 0x076C76 }, - { (char*) "Europe/Bucharest" , 0x0777F7 }, - { (char*) "Europe/Budapest" , 0x07808B }, - { (char*) "Europe/Busingen" , 0x0789D7 }, - { (char*) "Europe/Chisinau" , 0x079160 }, - { (char*) "Europe/Copenhagen" , 0x079AC2 }, - { (char*) "Europe/Dublin" , 0x07A327 }, - { (char*) "Europe/Gibraltar" , 0x07B0D7 }, - { (char*) "Europe/Guernsey" , 0x07BCDF }, - { (char*) "Europe/Helsinki" , 0x07CB7F }, - { (char*) "Europe/Isle_of_Man" , 0x07D2F7 }, - { (char*) "Europe/Istanbul" , 0x07E143 }, - { (char*) "Europe/Jersey" , 0x07E8DC }, - { (char*) "Europe/Kaliningrad" , 0x07F77C }, - { (char*) "Europe/Kiev" , 0x07FD71 }, - { (char*) "Europe/Kirov" , 0x0805C5 }, - { (char*) "Europe/Kyiv" , 0x080A80 }, - { (char*) "Europe/Lisbon" , 0x0812E3 }, - { (char*) "Europe/Ljubljana" , 0x0820C9 }, - { (char*) "Europe/London" , 0x082855 }, - { (char*) "Europe/Luxembourg" , 0x0836B1 }, - { (char*) "Europe/Madrid" , 0x08423F }, - { (char*) "Europe/Malta" , 0x084C91 }, - { (char*) "Europe/Mariehamn" , 0x0856D9 }, - { (char*) "Europe/Minsk" , 0x085E51 }, - { (char*) "Europe/Monaco" , 0x086378 }, - { (char*) "Europe/Moscow" , 0x086F04 }, - { (char*) "Europe/Nicosia" , 0x087523 }, - { (char*) "Europe/Oslo" , 0x087D01 }, - { (char*) "Europe/Paris" , 0x0885C1 }, - { (char*) "Europe/Podgorica" , 0x08915F }, - { (char*) "Europe/Prague" , 0x0898EB }, - { (char*) "Europe/Riga" , 0x08A1F4 }, - { (char*) "Europe/Rome" , 0x08AA96 }, - { (char*) "Europe/Samara" , 0x08B4F3 }, - { (char*) "Europe/San_Marino" , 0x08B9C9 }, - { (char*) "Europe/Sarajevo" , 0x08C426 }, - { (char*) "Europe/Saratov" , 0x08CBB2 }, - { (char*) "Europe/Simferopol" , 0x08D05F }, - { (char*) "Europe/Skopje" , 0x08D62E }, - { (char*) "Europe/Sofia" , 0x08DDBA }, - { (char*) "Europe/Stockholm" , 0x08E5E3 }, - { (char*) "Europe/Tallinn" , 0x08ED64 }, - { (char*) "Europe/Tirane" , 0x08F5D4 }, - { (char*) "Europe/Tiraspol" , 0x08FE04 }, - { (char*) "Europe/Ulyanovsk" , 0x090766 }, - { (char*) "Europe/Uzhgorod" , 0x090C69 }, - { (char*) "Europe/Vaduz" , 0x0914BD }, - { (char*) "Europe/Vatican" , 0x091C29 }, - { (char*) "Europe/Vienna" , 0x092686 }, - { (char*) "Europe/Vilnius" , 0x092F2A }, - { (char*) "Europe/Volgograd" , 0x0937A8 }, - { (char*) "Europe/Warsaw" , 0x093C6F }, - { (char*) "Europe/Zagreb" , 0x0946D9 }, - { (char*) "Europe/Zaporozhye" , 0x094E65 }, - { (char*) "Europe/Zurich" , 0x0956B9 }, - { (char*) "Factory" , 0x095E3A }, - { (char*) "GB" , 0x095EBA }, - { (char*) "GB-Eire" , 0x096D16 }, - { (char*) "GMT" , 0x097B72 }, - { (char*) "GMT+0" , 0x097BF0 }, - { (char*) "GMT-0" , 0x097C6E }, - { (char*) "GMT0" , 0x097CEC }, - { (char*) "Greenwich" , 0x097D6A }, - { (char*) "Hongkong" , 0x097DE8 }, - { (char*) "HST" , 0x0982C5 }, - { (char*) "Iceland" , 0x09841A }, - { (char*) "Indian/Antananarivo" , 0x0984BA }, - { (char*) "Indian/Chagos" , 0x0985A1 }, - { (char*) "Indian/Christmas" , 0x098666 }, - { (char*) "Indian/Cocos" , 0x098709 }, - { (char*) "Indian/Comoro" , 0x0987B5 }, - { (char*) "Indian/Kerguelen" , 0x098856 }, - { (char*) "Indian/Mahe" , 0x0988F9 }, - { (char*) "Indian/Maldives" , 0x09899C }, - { (char*) "Indian/Mauritius" , 0x098A61 }, - { (char*) "Indian/Mayotte" , 0x098B50 }, - { (char*) "Indian/Reunion" , 0x098BF1 }, - { (char*) "Iran" , 0x098C94 }, - { (char*) "Israel" , 0x099180 }, - { (char*) "Jamaica" , 0x099AE0 }, - { (char*) "Japan" , 0x099CCE }, - { (char*) "Kwajalein" , 0x099E0F }, - { (char*) "Libya" , 0x099F49 }, - { (char*) "MET" , 0x09A1C6 }, - { (char*) "Mexico/BajaNorte" , 0x09AD47 }, - { (char*) "Mexico/BajaSur" , 0x09B6ED }, - { (char*) "Mexico/General" , 0x09BB1D }, - { (char*) "MST" , 0x09BFEF }, - { (char*) "MST7MDT" , 0x09C163 }, - { (char*) "Navajo" , 0x09CB0B }, - { (char*) "NZ" , 0x09D4B3 }, - { (char*) "NZ-CHAT" , 0x09DE44 }, - { (char*) "Pacific/Apia" , 0x09E656 }, - { (char*) "Pacific/Auckland" , 0x09E8B8 }, - { (char*) "Pacific/Bougainville" , 0x09F25C }, - { (char*) "Pacific/Chatham" , 0x09F372 }, - { (char*) "Pacific/Chuuk" , 0x09FB93 }, - { (char*) "Pacific/Easter" , 0x09FCAD }, - { (char*) "Pacific/Efate" , 0x0A0571 }, - { (char*) "Pacific/Enderbury" , 0x0A0789 }, - { (char*) "Pacific/Fakaofo" , 0x0A0871 }, - { (char*) "Pacific/Fiji" , 0x0A0937 }, - { (char*) "Pacific/Funafuti" , 0x0A0B77 }, - { (char*) "Pacific/Galapagos" , 0x0A0C1B }, - { (char*) "Pacific/Gambier" , 0x0A0D18 }, - { (char*) "Pacific/Guadalcanal" , 0x0A0DC9 }, - { (char*) "Pacific/Guam" , 0x0A0E6D }, - { (char*) "Pacific/Honolulu" , 0x0A1067 }, - { (char*) "Pacific/Johnston" , 0x0A11C2 }, - { (char*) "Pacific/Kanton" , 0x0A1317 }, - { (char*) "Pacific/Kiritimati" , 0x0A140E }, - { (char*) "Pacific/Kosrae" , 0x0A1506 }, - { (char*) "Pacific/Kwajalein" , 0x0A1669 }, - { (char*) "Pacific/Majuro" , 0x0A17AC }, - { (char*) "Pacific/Marquesas" , 0x0A18F8 }, - { (char*) "Pacific/Midway" , 0x0A19B4 }, - { (char*) "Pacific/Nauru" , 0x0A1AA7 }, - { (char*) "Pacific/Niue" , 0x0A1BA1 }, - { (char*) "Pacific/Norfolk" , 0x0A1C6A }, - { (char*) "Pacific/Noumea" , 0x0A1FD8 }, - { (char*) "Pacific/Pago_Pago" , 0x0A2106 }, - { (char*) "Pacific/Palau" , 0x0A21C1 }, - { (char*) "Pacific/Pitcairn" , 0x0A2273 }, - { (char*) "Pacific/Pohnpei" , 0x0A233B }, - { (char*) "Pacific/Ponape" , 0x0A2476 }, - { (char*) "Pacific/Port_Moresby" , 0x0A251A }, - { (char*) "Pacific/Rarotonga" , 0x0A25EA }, - { (char*) "Pacific/Saipan" , 0x0A2843 }, - { (char*) "Pacific/Samoa" , 0x0A2A2F }, - { (char*) "Pacific/Tahiti" , 0x0A2AEA }, - { (char*) "Pacific/Tarawa" , 0x0A2B9C }, - { (char*) "Pacific/Tongatapu" , 0x0A2C4F }, - { (char*) "Pacific/Truk" , 0x0A2DC1 }, - { (char*) "Pacific/Wake" , 0x0A2E79 }, - { (char*) "Pacific/Wallis" , 0x0A2F28 }, - { (char*) "Pacific/Yap" , 0x0A2FCC }, - { (char*) "Poland" , 0x0A3084 }, - { (char*) "Portugal" , 0x0A3AEE }, - { (char*) "PRC" , 0x0A48C1 }, - { (char*) "PST8PDT" , 0x0A4AFE }, - { (char*) "ROC" , 0x0A562E }, - { (char*) "ROK" , 0x0A5933 }, - { (char*) "Singapore" , 0x0A5BA8 }, - { (char*) "Turkey" , 0x0A5D45 }, - { (char*) "UCT" , 0x0A64DE }, - { (char*) "Universal" , 0x0A655C }, - { (char*) "US/Alaska" , 0x0A65DA }, - { (char*) "US/Aleutian" , 0x0A6F29 }, - { (char*) "US/Arizona" , 0x0A7869 }, - { (char*) "US/Central" , 0x0A79DD }, - { (char*) "US/East-Indiana" , 0x0A87F1 }, - { (char*) "US/Eastern" , 0x0A8E8F }, - { (char*) "US/Hawaii" , 0x0A9C7B }, - { (char*) "US/Indiana-Starke" , 0x0A9DD0 }, - { (char*) "US/Michigan" , 0x0AA768 }, - { (char*) "US/Mountain" , 0x0AB02A }, - { (char*) "US/Pacific" , 0x0AB9D2 }, - { (char*) "US/Samoa" , 0x0AC502 }, - { (char*) "UTC" , 0x0AC5BD }, - { (char*) "W-SU" , 0x0AC63B }, - { (char*) "WET" , 0x0ACC46 }, - { (char*) "Zulu" , 0x0ADA19 }, + { (char*) "America/Coyhaique" , 0x011AEB }, + { (char*) "America/Creston" , 0x012351 }, + { (char*) "America/Cuiaba" , 0x01243F }, + { (char*) "America/Curacao" , 0x0129D0 }, + { (char*) "America/Danmarkshavn" , 0x012A96 }, + { (char*) "America/Dawson" , 0x012D76 }, + { (char*) "America/Dawson_Creek" , 0x0133E2 }, + { (char*) "America/Denver" , 0x013828 }, + { (char*) "America/Detroit" , 0x0141E5 }, + { (char*) "America/Dominica" , 0x014AC0 }, + { (char*) "America/Edmonton" , 0x014B60 }, + { (char*) "America/Eirunepe" , 0x0154AA }, + { (char*) "America/El_Salvador" , 0x015747 }, + { (char*) "America/Ensenada" , 0x015833 }, + { (char*) "America/Fort_Nelson" , 0x0161D9 }, + { (char*) "America/Fort_Wayne" , 0x016AB9 }, + { (char*) "America/Fortaleza" , 0x017157 }, + { (char*) "America/Glace_Bay" , 0x017447 }, + { (char*) "America/Godthab" , 0x017CFE }, + { (char*) "America/Goose_Bay" , 0x01846B }, + { (char*) "America/Grand_Turk" , 0x019121 }, + { (char*) "America/Grenada" , 0x019857 }, + { (char*) "America/Guadeloupe" , 0x0198F7 }, + { (char*) "America/Guatemala" , 0x019997 }, + { (char*) "America/Guayaquil" , 0x019ABB }, + { (char*) "America/Guyana" , 0x019BC1 }, + { (char*) "America/Halifax" , 0x019CC5 }, + { (char*) "America/Havana" , 0x01AA4F }, + { (char*) "America/Hermosillo" , 0x01B3CB }, + { (char*) "America/Indiana/Indianapolis" , 0x01B561 }, + { (char*) "America/Indiana/Knox" , 0x01BC18 }, + { (char*) "America/Indiana/Marengo" , 0x01C5C5 }, + { (char*) "America/Indiana/Petersburg" , 0x01CCB2 }, + { (char*) "America/Indiana/Tell_City" , 0x01D451 }, + { (char*) "America/Indiana/Vevay" , 0x01DB15 }, + { (char*) "America/Indiana/Vincennes" , 0x01E0D1 }, + { (char*) "America/Indiana/Winamac" , 0x01E7A7 }, + { (char*) "America/Indianapolis" , 0x01EECB }, + { (char*) "America/Inuvik" , 0x01F569 }, + { (char*) "America/Iqaluit" , 0x01FDA3 }, + { (char*) "America/Jamaica" , 0x020662 }, + { (char*) "America/Jujuy" , 0x020850 }, + { (char*) "America/Juneau" , 0x020C66 }, + { (char*) "America/Kentucky/Louisville" , 0x0215B7 }, + { (char*) "America/Kentucky/Monticello" , 0x0220C5 }, + { (char*) "America/Knox_IN" , 0x022A25 }, + { (char*) "America/Kralendijk" , 0x0233BD }, + { (char*) "America/La_Paz" , 0x0234BF }, + { (char*) "America/Lima" , 0x0235A5 }, + { (char*) "America/Los_Angeles" , 0x023739 }, + { (char*) "America/Louisville" , 0x024270 }, + { (char*) "America/Lower_Princes" , 0x024D60 }, + { (char*) "America/Maceio" , 0x024E62 }, + { (char*) "America/Managua" , 0x025158 }, + { (char*) "America/Manaus" , 0x025312 }, + { (char*) "America/Marigot" , 0x02557B }, + { (char*) "America/Martinique" , 0x02567D }, + { (char*) "America/Matamoros" , 0x025771 }, + { (char*) "America/Mazatlan" , 0x025D33 }, + { (char*) "America/Mendoza" , 0x026195 }, + { (char*) "America/Menominee" , 0x0265C7 }, + { (char*) "America/Merida" , 0x026ED4 }, + { (char*) "America/Metlakatla" , 0x0272DD }, + { (char*) "America/Mexico_City" , 0x02788F }, + { (char*) "America/Miquelon" , 0x027D6F }, + { (char*) "America/Moncton" , 0x0283EF }, + { (char*) "America/Monterrey" , 0x029065 }, + { (char*) "America/Montevideo" , 0x029501 }, + { (char*) "America/Montreal" , 0x029AE5 }, + { (char*) "America/Montserrat" , 0x02A897 }, + { (char*) "America/Nassau" , 0x02A937 }, + { (char*) "America/New_York" , 0x02B297 }, + { (char*) "America/Nipigon" , 0x02C097 }, + { (char*) "America/Nome" , 0x02CE49 }, + { (char*) "America/Noronha" , 0x02D7A1 }, + { (char*) "America/North_Dakota/Beulah" , 0x02DA7B }, + { (char*) "America/North_Dakota/Center" , 0x02E3F8 }, + { (char*) "America/North_Dakota/New_Salem" , 0x02ED75 }, + { (char*) "America/Nuuk" , 0x02F6F8 }, + { (char*) "America/Ojinaga" , 0x02FE76 }, + { (char*) "America/Panama" , 0x030492 }, + { (char*) "America/Pangnirtung" , 0x030554 }, + { (char*) "America/Paramaribo" , 0x030DFA }, + { (char*) "America/Phoenix" , 0x030EFE }, + { (char*) "America/Port-au-Prince" , 0x03108A }, + { (char*) "America/Port_of_Spain" , 0x031630 }, + { (char*) "America/Porto_Acre" , 0x0316D0 }, + { (char*) "America/Porto_Velho" , 0x031942 }, + { (char*) "America/Puerto_Rico" , 0x031B88 }, + { (char*) "America/Punta_Arenas" , 0x031C8A }, + { (char*) "America/Rainy_River" , 0x032415 }, + { (char*) "America/Rankin_Inlet" , 0x032F55 }, + { (char*) "America/Recife" , 0x033789 }, + { (char*) "America/Regina" , 0x033A5D }, + { (char*) "America/Resolute" , 0x033E52 }, + { (char*) "America/Rio_Branco" , 0x034687 }, + { (char*) "America/Rosario" , 0x0348FD }, + { (char*) "America/Santa_Isabel" , 0x034D2F }, + { (char*) "America/Santarem" , 0x0356D5 }, + { (char*) "America/Santiago" , 0x035938 }, + { (char*) "America/Santo_Domingo" , 0x036324 }, + { (char*) "America/Sao_Paulo" , 0x0364FA }, + { (char*) "America/Scoresbysund" , 0x036AD2 }, + { (char*) "America/Shiprock" , 0x03728A }, + { (char*) "America/Sitka" , 0x037C32 }, + { (char*) "America/St_Barthelemy" , 0x03856A }, + { (char*) "America/St_Johns" , 0x03866C }, + { (char*) "America/St_Kitts" , 0x0394DA }, + { (char*) "America/St_Lucia" , 0x03957A }, + { (char*) "America/St_Thomas" , 0x03963C }, + { (char*) "America/St_Vincent" , 0x0396DC }, + { (char*) "America/Swift_Current" , 0x03979E }, + { (char*) "America/Tegucigalpa" , 0x0399EC }, + { (char*) "America/Thule" , 0x039AF4 }, + { (char*) "America/Thunder_Bay" , 0x03A0EC }, + { (char*) "America/Tijuana" , 0x03AE9E }, + { (char*) "America/Toronto" , 0x03B853 }, + { (char*) "America/Tortola" , 0x03C623 }, + { (char*) "America/Vancouver" , 0x03C6C3 }, + { (char*) "America/Virgin" , 0x03D234 }, + { (char*) "America/Whitehorse" , 0x03D336 }, + { (char*) "America/Winnipeg" , 0x03D9A2 }, + { (char*) "America/Yakutat" , 0x03E4FF }, + { (char*) "America/Yellowknife" , 0x03EE1C }, + { (char*) "Antarctica/Casey" , 0x03F744 }, + { (char*) "Antarctica/Davis" , 0x03F8FC }, + { (char*) "Antarctica/DumontDUrville" , 0x03FA28 }, + { (char*) "Antarctica/Macquarie" , 0x03FAF8 }, + { (char*) "Antarctica/Mawson" , 0x0403E8 }, + { (char*) "Antarctica/McMurdo" , 0x0404B3 }, + { (char*) "Antarctica/Palmer" , 0x040CAE }, + { (char*) "Antarctica/Rothera" , 0x04123C }, + { (char*) "Antarctica/South_Pole" , 0x0412E5 }, + { (char*) "Antarctica/Syowa" , 0x041C76 }, + { (char*) "Antarctica/Troll" , 0x041D1E }, + { (char*) "Antarctica/Vostok" , 0x0421AB }, + { (char*) "Arctic/Longyearbyen" , 0x042292 }, + { (char*) "Asia/Aden" , 0x042B98 }, + { (char*) "Asia/Almaty" , 0x042C3B }, + { (char*) "Asia/Amman" , 0x043030 }, + { (char*) "Asia/Anadyr" , 0x0435D5 }, + { (char*) "Asia/Aqtau" , 0x043A8A }, + { (char*) "Asia/Aqtobe" , 0x043E74 }, + { (char*) "Asia/Ashgabat" , 0x044272 }, + { (char*) "Asia/Ashkhabad" , 0x0444DB }, + { (char*) "Asia/Atyrau" , 0x044744 }, + { (char*) "Asia/Baghdad" , 0x044B36 }, + { (char*) "Asia/Bahrain" , 0x044F0B }, + { (char*) "Asia/Baku" , 0x044FF6 }, + { (char*) "Asia/Bangkok" , 0x0454BF }, + { (char*) "Asia/Barnaul" , 0x045584 }, + { (char*) "Asia/Beirut" , 0x045A55 }, + { (char*) "Asia/Bishkek" , 0x0462CB }, + { (char*) "Asia/Brunei" , 0x0466A0 }, + { (char*) "Asia/Calcutta" , 0x046769 }, + { (char*) "Asia/Chita" , 0x046892 }, + { (char*) "Asia/Choibalsan" , 0x046D69 }, + { (char*) "Asia/Chongqing" , 0x0470E2 }, + { (char*) "Asia/Chungking" , 0x04731F }, + { (char*) "Asia/Colombo" , 0x04755C }, + { (char*) "Asia/Dacca" , 0x0476CE }, + { (char*) "Asia/Damascus" , 0x04781D }, + { (char*) "Asia/Dhaka" , 0x047F7A }, + { (char*) "Asia/Dili" , 0x0480C9 }, + { (char*) "Asia/Dubai" , 0x0481D6 }, + { (char*) "Asia/Dushanbe" , 0x048279 }, + { (char*) "Asia/Famagusta" , 0x0484C6 }, + { (char*) "Asia/Gaza" , 0x048CCD }, + { (char*) "Asia/Harbin" , 0x049BE7 }, + { (char*) "Asia/Hebron" , 0x049E24 }, + { (char*) "Asia/Ho_Chi_Minh" , 0x04AD59 }, + { (char*) "Asia/Hong_Kong" , 0x04AEB6 }, + { (char*) "Asia/Hovd" , 0x04B393 }, + { (char*) "Asia/Irkutsk" , 0x04B722 }, + { (char*) "Asia/Istanbul" , 0x04BC15 }, + { (char*) "Asia/Jakarta" , 0x04C3AE }, + { (char*) "Asia/Jayapura" , 0x04C546 }, + { (char*) "Asia/Jerusalem" , 0x04C665 }, + { (char*) "Asia/Kabul" , 0x04CFC5 }, + { (char*) "Asia/Kamchatka" , 0x04D093 }, + { (char*) "Asia/Karachi" , 0x04D531 }, + { (char*) "Asia/Kashgar" , 0x04D6B8 }, + { (char*) "Asia/Kathmandu" , 0x04D75B }, + { (char*) "Asia/Katmandu" , 0x04D82D }, + { (char*) "Asia/Khandyga" , 0x04D8FF }, + { (char*) "Asia/Kolkata" , 0x04DE12 }, + { (char*) "Asia/Krasnoyarsk" , 0x04DF3B }, + { (char*) "Asia/Kuala_Lumpur" , 0x04E409 }, + { (char*) "Asia/Kuching" , 0x04E5BA }, + { (char*) "Asia/Kuwait" , 0x04E7A9 }, + { (char*) "Asia/Macao" , 0x04E84C }, + { (char*) "Asia/Macau" , 0x04ED23 }, + { (char*) "Asia/Magadan" , 0x04F1FA }, + { (char*) "Asia/Makassar" , 0x04F6CE }, + { (char*) "Asia/Manila" , 0x04F821 }, + { (char*) "Asia/Muscat" , 0x04F9D3 }, + { (char*) "Asia/Nicosia" , 0x04FA76 }, + { (char*) "Asia/Novokuznetsk" , 0x050262 }, + { (char*) "Asia/Novosibirsk" , 0x0506FE }, + { (char*) "Asia/Omsk" , 0x050BD5 }, + { (char*) "Asia/Oral" , 0x051097 }, + { (char*) "Asia/Phnom_Penh" , 0x051491 }, + { (char*) "Asia/Pontianak" , 0x0515B6 }, + { (char*) "Asia/Pyongyang" , 0x051739 }, + { (char*) "Asia/Qatar" , 0x051832 }, + { (char*) "Asia/Qostanay" , 0x0518F7 }, + { (char*) "Asia/Qyzylorda" , 0x051D1E }, + { (char*) "Asia/Rangoon" , 0x05213A }, + { (char*) "Asia/Riyadh" , 0x052244 }, + { (char*) "Asia/Saigon" , 0x0522E7 }, + { (char*) "Asia/Sakhalin" , 0x052444 }, + { (char*) "Asia/Samarkand" , 0x05290C }, + { (char*) "Asia/Seoul" , 0x052B5C }, + { (char*) "Asia/Shanghai" , 0x052DD1 }, + { (char*) "Asia/Singapore" , 0x05301A }, + { (char*) "Asia/Srednekolymsk" , 0x0531B7 }, + { (char*) "Asia/Taipei" , 0x05368B }, + { (char*) "Asia/Tashkent" , 0x053990 }, + { (char*) "Asia/Tbilisi" , 0x053BEE }, + { (char*) "Asia/Tehran" , 0x053FF7 }, + { (char*) "Asia/Tel_Aviv" , 0x0544E3 }, + { (char*) "Asia/Thimbu" , 0x054E43 }, + { (char*) "Asia/Thimphu" , 0x054F0C }, + { (char*) "Asia/Tokyo" , 0x054FD5 }, + { (char*) "Asia/Tomsk" , 0x055116 }, + { (char*) "Asia/Ujung_Pandang" , 0x0555E7 }, + { (char*) "Asia/Ulaanbaatar" , 0x0556F1 }, + { (char*) "Asia/Ulan_Bator" , 0x055A7A }, + { (char*) "Asia/Urumqi" , 0x055DF3 }, + { (char*) "Asia/Ust-Nera" , 0x055EA3 }, + { (char*) "Asia/Vientiane" , 0x056399 }, + { (char*) "Asia/Vladivostok" , 0x0564DA }, + { (char*) "Asia/Yakutsk" , 0x0569A3 }, + { (char*) "Asia/Yangon" , 0x056E6B }, + { (char*) "Asia/Yekaterinburg" , 0x056F75 }, + { (char*) "Asia/Yerevan" , 0x05745C }, + { (char*) "Atlantic/Azores" , 0x0578D9 }, + { (char*) "Atlantic/Bermuda" , 0x05865D }, + { (char*) "Atlantic/Canary" , 0x058FC5 }, + { (char*) "Atlantic/Cape_Verde" , 0x059748 }, + { (char*) "Atlantic/Faeroe" , 0x059854 }, + { (char*) "Atlantic/Faroe" , 0x059F77 }, + { (char*) "Atlantic/Jan_Mayen" , 0x05A69A }, + { (char*) "Atlantic/Madeira" , 0x05AFA0 }, + { (char*) "Atlantic/Reykjavik" , 0x05BCEC }, + { (char*) "Atlantic/South_Georgia" , 0x05C182 }, + { (char*) "Atlantic/St_Helena" , 0x05C224 }, + { (char*) "Atlantic/Stanley" , 0x05C2E6 }, + { (char*) "Australia/ACT" , 0x05C7A2 }, + { (char*) "Australia/Adelaide" , 0x05D03C }, + { (char*) "Australia/Brisbane" , 0x05D8F7 }, + { (char*) "Australia/Broken_Hill" , 0x05DABD }, + { (char*) "Australia/Canberra" , 0x05E39A }, + { (char*) "Australia/Currie" , 0x05EC34 }, + { (char*) "Australia/Darwin" , 0x05F576 }, + { (char*) "Australia/Eucla" , 0x05F6D9 }, + { (char*) "Australia/Hobart" , 0x05F8C6 }, + { (char*) "Australia/LHI" , 0x060210 }, + { (char*) "Australia/Lindeman" , 0x060952 }, + { (char*) "Australia/Lord_Howe" , 0x060B58 }, + { (char*) "Australia/Melbourne" , 0x0612AA }, + { (char*) "Australia/North" , 0x061B4C }, + { (char*) "Australia/NSW" , 0x061C9D }, + { (char*) "Australia/Perth" , 0x062537 }, + { (char*) "Australia/Queensland" , 0x06271F }, + { (char*) "Australia/South" , 0x0628CE }, + { (char*) "Australia/Sydney" , 0x06317A }, + { (char*) "Australia/Tasmania" , 0x063A30 }, + { (char*) "Australia/Victoria" , 0x064372 }, + { (char*) "Australia/West" , 0x064C0C }, + { (char*) "Australia/Yancowinna" , 0x064DD6 }, + { (char*) "Brazil/Acre" , 0x065697 }, + { (char*) "Brazil/DeNoronha" , 0x065909 }, + { (char*) "Brazil/East" , 0x065BD3 }, + { (char*) "Brazil/West" , 0x066175 }, + { (char*) "Canada/Atlantic" , 0x0663CF }, + { (char*) "Canada/Central" , 0x06713B }, + { (char*) "Canada/Eastern" , 0x067C7B }, + { (char*) "Canada/Mountain" , 0x068A2D }, + { (char*) "Canada/Newfoundland" , 0x069355 }, + { (char*) "Canada/Pacific" , 0x06A1A8 }, + { (char*) "Canada/Saskatchewan" , 0x06AD00 }, + { (char*) "Canada/Yukon" , 0x06B0E0 }, + { (char*) "CET" , 0x06B73A }, + { (char*) "Chile/Continental" , 0x06C2BB }, + { (char*) "Chile/EasterIsland" , 0x06CC9A }, + { (char*) "CST6CDT" , 0x06D551 }, + { (char*) "Cuba" , 0x06E365 }, + { (char*) "EET" , 0x06ECE1 }, + { (char*) "Egypt" , 0x06F5C3 }, + { (char*) "Eire" , 0x06FF2E }, + { (char*) "EST" , 0x070CDE }, + { (char*) "EST5EDT" , 0x070DA0 }, + { (char*) "Etc/GMT" , 0x071B8C }, + { (char*) "Etc/GMT+0" , 0x071C0A }, + { (char*) "Etc/GMT+1" , 0x071C88 }, + { (char*) "Etc/GMT+10" , 0x071D08 }, + { (char*) "Etc/GMT+11" , 0x071D89 }, + { (char*) "Etc/GMT+12" , 0x071E0A }, + { (char*) "Etc/GMT+2" , 0x071E8B }, + { (char*) "Etc/GMT+3" , 0x071F0B }, + { (char*) "Etc/GMT+4" , 0x071F8B }, + { (char*) "Etc/GMT+5" , 0x07200B }, + { (char*) "Etc/GMT+6" , 0x07208B }, + { (char*) "Etc/GMT+7" , 0x07210B }, + { (char*) "Etc/GMT+8" , 0x07218B }, + { (char*) "Etc/GMT+9" , 0x07220B }, + { (char*) "Etc/GMT-0" , 0x07228B }, + { (char*) "Etc/GMT-1" , 0x072309 }, + { (char*) "Etc/GMT-10" , 0x07238A }, + { (char*) "Etc/GMT-11" , 0x07240C }, + { (char*) "Etc/GMT-12" , 0x07248E }, + { (char*) "Etc/GMT-13" , 0x072510 }, + { (char*) "Etc/GMT-14" , 0x072592 }, + { (char*) "Etc/GMT-2" , 0x072614 }, + { (char*) "Etc/GMT-3" , 0x072695 }, + { (char*) "Etc/GMT-4" , 0x072716 }, + { (char*) "Etc/GMT-5" , 0x072797 }, + { (char*) "Etc/GMT-6" , 0x072818 }, + { (char*) "Etc/GMT-7" , 0x072899 }, + { (char*) "Etc/GMT-8" , 0x07291A }, + { (char*) "Etc/GMT-9" , 0x07299B }, + { (char*) "Etc/GMT0" , 0x072A1C }, + { (char*) "Etc/Greenwich" , 0x072A9A }, + { (char*) "Etc/UCT" , 0x072B18 }, + { (char*) "Etc/Universal" , 0x072B96 }, + { (char*) "Etc/UTC" , 0x072C14 }, + { (char*) "Etc/Zulu" , 0x072C92 }, + { (char*) "Europe/Amsterdam" , 0x072D10 }, + { (char*) "Europe/Andorra" , 0x07387A }, + { (char*) "Europe/Astrakhan" , 0x073F54 }, + { (char*) "Europe/Athens" , 0x0743F1 }, + { (char*) "Europe/Belfast" , 0x074CD3 }, + { (char*) "Europe/Belgrade" , 0x075B2F }, + { (char*) "Europe/Berlin" , 0x0762BB }, + { (char*) "Europe/Bratislava" , 0x076BD0 }, + { (char*) "Europe/Brussels" , 0x0774D9 }, + { (char*) "Europe/Bucharest" , 0x07805A }, + { (char*) "Europe/Budapest" , 0x0788EE }, + { (char*) "Europe/Busingen" , 0x07923A }, + { (char*) "Europe/Chisinau" , 0x0799C3 }, + { (char*) "Europe/Copenhagen" , 0x07A325 }, + { (char*) "Europe/Dublin" , 0x07AB8A }, + { (char*) "Europe/Gibraltar" , 0x07B93A }, + { (char*) "Europe/Guernsey" , 0x07C542 }, + { (char*) "Europe/Helsinki" , 0x07D3E2 }, + { (char*) "Europe/Isle_of_Man" , 0x07DB5A }, + { (char*) "Europe/Istanbul" , 0x07E9A6 }, + { (char*) "Europe/Jersey" , 0x07F13F }, + { (char*) "Europe/Kaliningrad" , 0x07FFDF }, + { (char*) "Europe/Kiev" , 0x0805D4 }, + { (char*) "Europe/Kirov" , 0x080E28 }, + { (char*) "Europe/Kyiv" , 0x0812E3 }, + { (char*) "Europe/Lisbon" , 0x081B46 }, + { (char*) "Europe/Ljubljana" , 0x08292C }, + { (char*) "Europe/London" , 0x0830B8 }, + { (char*) "Europe/Luxembourg" , 0x083F14 }, + { (char*) "Europe/Madrid" , 0x084AA2 }, + { (char*) "Europe/Malta" , 0x0854F4 }, + { (char*) "Europe/Mariehamn" , 0x085F3C }, + { (char*) "Europe/Minsk" , 0x0866B4 }, + { (char*) "Europe/Monaco" , 0x086BDB }, + { (char*) "Europe/Moscow" , 0x087767 }, + { (char*) "Europe/Nicosia" , 0x087D86 }, + { (char*) "Europe/Oslo" , 0x088564 }, + { (char*) "Europe/Paris" , 0x088E24 }, + { (char*) "Europe/Podgorica" , 0x0899C2 }, + { (char*) "Europe/Prague" , 0x08A14E }, + { (char*) "Europe/Riga" , 0x08AA57 }, + { (char*) "Europe/Rome" , 0x08B2F9 }, + { (char*) "Europe/Samara" , 0x08BD56 }, + { (char*) "Europe/San_Marino" , 0x08C22C }, + { (char*) "Europe/Sarajevo" , 0x08CC89 }, + { (char*) "Europe/Saratov" , 0x08D415 }, + { (char*) "Europe/Simferopol" , 0x08D8C2 }, + { (char*) "Europe/Skopje" , 0x08DE91 }, + { (char*) "Europe/Sofia" , 0x08E61D }, + { (char*) "Europe/Stockholm" , 0x08EE46 }, + { (char*) "Europe/Tallinn" , 0x08F5C7 }, + { (char*) "Europe/Tirane" , 0x08FE37 }, + { (char*) "Europe/Tiraspol" , 0x090667 }, + { (char*) "Europe/Ulyanovsk" , 0x090FC9 }, + { (char*) "Europe/Uzhgorod" , 0x0914CC }, + { (char*) "Europe/Vaduz" , 0x091D20 }, + { (char*) "Europe/Vatican" , 0x09248C }, + { (char*) "Europe/Vienna" , 0x092EE9 }, + { (char*) "Europe/Vilnius" , 0x09378D }, + { (char*) "Europe/Volgograd" , 0x09400B }, + { (char*) "Europe/Warsaw" , 0x0944D2 }, + { (char*) "Europe/Zagreb" , 0x094F3C }, + { (char*) "Europe/Zaporozhye" , 0x0956C8 }, + { (char*) "Europe/Zurich" , 0x095F1C }, + { (char*) "Factory" , 0x09669D }, + { (char*) "GB" , 0x09671D }, + { (char*) "GB-Eire" , 0x097579 }, + { (char*) "GMT" , 0x0983D5 }, + { (char*) "GMT+0" , 0x098453 }, + { (char*) "GMT-0" , 0x0984D1 }, + { (char*) "GMT0" , 0x09854F }, + { (char*) "Greenwich" , 0x0985CD }, + { (char*) "Hongkong" , 0x09864B }, + { (char*) "HST" , 0x098B28 }, + { (char*) "Iceland" , 0x098C7D }, + { (char*) "Indian/Antananarivo" , 0x098D1D }, + { (char*) "Indian/Chagos" , 0x098E04 }, + { (char*) "Indian/Christmas" , 0x098EC9 }, + { (char*) "Indian/Cocos" , 0x098F6C }, + { (char*) "Indian/Comoro" , 0x099018 }, + { (char*) "Indian/Kerguelen" , 0x0990B9 }, + { (char*) "Indian/Mahe" , 0x09915C }, + { (char*) "Indian/Maldives" , 0x0991FF }, + { (char*) "Indian/Mauritius" , 0x0992C4 }, + { (char*) "Indian/Mayotte" , 0x0993B3 }, + { (char*) "Indian/Reunion" , 0x099454 }, + { (char*) "Iran" , 0x0994F7 }, + { (char*) "Israel" , 0x0999E3 }, + { (char*) "Jamaica" , 0x09A343 }, + { (char*) "Japan" , 0x09A531 }, + { (char*) "Kwajalein" , 0x09A672 }, + { (char*) "Libya" , 0x09A7AC }, + { (char*) "MET" , 0x09AA29 }, + { (char*) "Mexico/BajaNorte" , 0x09B5AA }, + { (char*) "Mexico/BajaSur" , 0x09BF50 }, + { (char*) "Mexico/General" , 0x09C380 }, + { (char*) "MST" , 0x09C852 }, + { (char*) "MST7MDT" , 0x09C9C6 }, + { (char*) "Navajo" , 0x09D36E }, + { (char*) "NZ" , 0x09DD16 }, + { (char*) "NZ-CHAT" , 0x09E6A7 }, + { (char*) "Pacific/Apia" , 0x09EEB9 }, + { (char*) "Pacific/Auckland" , 0x09F11B }, + { (char*) "Pacific/Bougainville" , 0x09FABF }, + { (char*) "Pacific/Chatham" , 0x09FBD5 }, + { (char*) "Pacific/Chuuk" , 0x0A03F6 }, + { (char*) "Pacific/Easter" , 0x0A0510 }, + { (char*) "Pacific/Efate" , 0x0A0DD4 }, + { (char*) "Pacific/Enderbury" , 0x0A0FEC }, + { (char*) "Pacific/Fakaofo" , 0x0A10D4 }, + { (char*) "Pacific/Fiji" , 0x0A119A }, + { (char*) "Pacific/Funafuti" , 0x0A13DA }, + { (char*) "Pacific/Galapagos" , 0x0A147E }, + { (char*) "Pacific/Gambier" , 0x0A157B }, + { (char*) "Pacific/Guadalcanal" , 0x0A162C }, + { (char*) "Pacific/Guam" , 0x0A16D0 }, + { (char*) "Pacific/Honolulu" , 0x0A18CA }, + { (char*) "Pacific/Johnston" , 0x0A1A25 }, + { (char*) "Pacific/Kanton" , 0x0A1B7A }, + { (char*) "Pacific/Kiritimati" , 0x0A1C71 }, + { (char*) "Pacific/Kosrae" , 0x0A1D69 }, + { (char*) "Pacific/Kwajalein" , 0x0A1ECC }, + { (char*) "Pacific/Majuro" , 0x0A200F }, + { (char*) "Pacific/Marquesas" , 0x0A215B }, + { (char*) "Pacific/Midway" , 0x0A2217 }, + { (char*) "Pacific/Nauru" , 0x0A230A }, + { (char*) "Pacific/Niue" , 0x0A2404 }, + { (char*) "Pacific/Norfolk" , 0x0A24CD }, + { (char*) "Pacific/Noumea" , 0x0A283B }, + { (char*) "Pacific/Pago_Pago" , 0x0A2969 }, + { (char*) "Pacific/Palau" , 0x0A2A24 }, + { (char*) "Pacific/Pitcairn" , 0x0A2AD6 }, + { (char*) "Pacific/Pohnpei" , 0x0A2B9E }, + { (char*) "Pacific/Ponape" , 0x0A2CD9 }, + { (char*) "Pacific/Port_Moresby" , 0x0A2D7D }, + { (char*) "Pacific/Rarotonga" , 0x0A2E4D }, + { (char*) "Pacific/Saipan" , 0x0A30A6 }, + { (char*) "Pacific/Samoa" , 0x0A3292 }, + { (char*) "Pacific/Tahiti" , 0x0A334D }, + { (char*) "Pacific/Tarawa" , 0x0A33FF }, + { (char*) "Pacific/Tongatapu" , 0x0A34B2 }, + { (char*) "Pacific/Truk" , 0x0A3624 }, + { (char*) "Pacific/Wake" , 0x0A36DC }, + { (char*) "Pacific/Wallis" , 0x0A378B }, + { (char*) "Pacific/Yap" , 0x0A382F }, + { (char*) "Poland" , 0x0A38E7 }, + { (char*) "Portugal" , 0x0A4351 }, + { (char*) "PRC" , 0x0A5124 }, + { (char*) "PST8PDT" , 0x0A5361 }, + { (char*) "ROC" , 0x0A5E91 }, + { (char*) "ROK" , 0x0A6196 }, + { (char*) "Singapore" , 0x0A640B }, + { (char*) "Turkey" , 0x0A65A8 }, + { (char*) "UCT" , 0x0A6D41 }, + { (char*) "Universal" , 0x0A6DBF }, + { (char*) "US/Alaska" , 0x0A6E3D }, + { (char*) "US/Aleutian" , 0x0A778C }, + { (char*) "US/Arizona" , 0x0A80CC }, + { (char*) "US/Central" , 0x0A8240 }, + { (char*) "US/East-Indiana" , 0x0A9054 }, + { (char*) "US/Eastern" , 0x0A96F2 }, + { (char*) "US/Hawaii" , 0x0AA4DE }, + { (char*) "US/Indiana-Starke" , 0x0AA633 }, + { (char*) "US/Michigan" , 0x0AAFCB }, + { (char*) "US/Mountain" , 0x0AB88D }, + { (char*) "US/Pacific" , 0x0AC235 }, + { (char*) "US/Samoa" , 0x0ACD65 }, + { (char*) "UTC" , 0x0ACE20 }, + { (char*) "W-SU" , 0x0ACE9E }, + { (char*) "WET" , 0x0AD4A9 }, + { (char*) "Zulu" , 0x0AE27C }, }; -const unsigned char timelib_timezone_db_data_builtin[711319] = { +const unsigned char timelib_timezone_db_data_builtin[713466] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -29630,6 +29720,143 @@ const unsigned char timelib_timezone_db_data_builtin[711319] = { 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A, 0x00, 0x98, 0x7C, 0x75, 0x00, 0x92, 0x5B, 0x72, 0x00, 0x00, 0x00, 0x00, +/* America/Coyhaique */ +0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00, +0x8F, 0x30, 0x47, 0x45, 0x9B, 0x5C, 0xE5, 0x50, 0x9F, 0x7C, 0xE2, 0xC5, 0xA1, 0x00, 0x71, 0xC0, +0xB0, 0x5E, 0x77, 0xC5, 0xB1, 0x77, 0x3D, 0x40, 0xB2, 0x41, 0x00, 0xD0, 0xB3, 0x58, 0x70, 0xC0, +0xB4, 0x22, 0x34, 0x50, 0xB5, 0x39, 0xA4, 0x40, 0xB6, 0x03, 0x67, 0xD0, 0xB7, 0x1A, 0xD7, 0xC0, +0xB7, 0xE4, 0x9B, 0x50, 0xB8, 0xFD, 0x5C, 0xC0, 0xB9, 0xC7, 0x20, 0x50, 0xCC, 0x1C, 0x6E, 0x40, +0xCC, 0x6C, 0xE7, 0xD0, 0xD4, 0x17, 0xE3, 0x40, 0xD5, 0x33, 0x55, 0xC0, 0xD5, 0x76, 0x92, 0x40, +0xFD, 0xD1, 0x3C, 0x40, 0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x72, 0xDC, 0xB0, +0x01, 0x75, 0x50, 0xC0, 0x02, 0x40, 0x49, 0xB0, 0x03, 0x55, 0x32, 0xC0, 0x04, 0x20, 0x2B, 0xB0, +0x05, 0x3E, 0x4F, 0x40, 0x06, 0x00, 0x0D, 0xB0, 0x07, 0x0B, 0xBC, 0x40, 0x07, 0xDF, 0xEF, 0xB0, +0x08, 0xFE, 0x13, 0x40, 0x09, 0xBF, 0xD1, 0xB0, 0x0A, 0xDD, 0xF5, 0x40, 0x0B, 0xA8, 0xEE, 0x30, +0x0C, 0xBD, 0xD7, 0x40, 0x0D, 0x88, 0xD0, 0x30, 0x0E, 0x9D, 0xB9, 0x40, 0x0F, 0x68, 0xB2, 0x30, +0x10, 0x86, 0xD5, 0xC0, 0x11, 0x48, 0x94, 0x30, 0x12, 0x66, 0xB7, 0xC0, 0x13, 0x28, 0x76, 0x30, +0x14, 0x46, 0x99, 0xC0, 0x15, 0x11, 0x92, 0xB0, 0x16, 0x26, 0x7B, 0xC0, 0x16, 0xF1, 0x74, 0xB0, +0x18, 0x06, 0x5D, 0xC0, 0x18, 0xD1, 0x56, 0xB0, 0x19, 0xE6, 0x3F, 0xC0, 0x1A, 0xB1, 0x38, 0xB0, +0x1B, 0xCF, 0x5C, 0x40, 0x1C, 0x91, 0x1A, 0xB0, 0x1D, 0xAF, 0x3E, 0x40, 0x1E, 0x70, 0xFC, 0xB0, +0x1F, 0x8F, 0x20, 0x40, 0x20, 0x7F, 0x03, 0x30, 0x21, 0x6F, 0x02, 0x40, 0x22, 0x39, 0xFB, 0x30, +0x23, 0x4E, 0xE4, 0x40, 0x24, 0x19, 0xDD, 0x30, 0x25, 0x38, 0x00, 0xC0, 0x25, 0xF9, 0xBF, 0x30, +0x26, 0xF2, 0xF8, 0xC0, 0x27, 0xD9, 0xA1, 0x30, 0x28, 0xF7, 0xC4, 0xC0, 0x29, 0xC2, 0xBD, 0xB0, +0x2A, 0xD7, 0xA6, 0xC0, 0x2B, 0xA2, 0x9F, 0xB0, 0x2C, 0xB7, 0x88, 0xC0, 0x2D, 0x82, 0x81, 0xB0, +0x2E, 0x97, 0x6A, 0xC0, 0x2F, 0x62, 0x63, 0xB0, 0x30, 0x80, 0x87, 0x40, 0x31, 0x42, 0x45, 0xB0, +0x32, 0x60, 0x69, 0x40, 0x33, 0x3D, 0xD7, 0x30, 0x34, 0x40, 0x4B, 0x40, 0x35, 0x0B, 0x44, 0x30, +0x36, 0x0D, 0xB8, 0x40, 0x37, 0x06, 0xD5, 0xB0, 0x38, 0x00, 0x0F, 0x40, 0x38, 0xCB, 0x08, 0x30, +0x39, 0xE9, 0x2B, 0xC0, 0x3A, 0xAA, 0xEA, 0x30, 0x3B, 0xC9, 0x0D, 0xC0, 0x3C, 0x8A, 0xCC, 0x30, +0x3D, 0xA8, 0xEF, 0xC0, 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, +0x41, 0x68, 0xB3, 0xC0, 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, +0x45, 0x31, 0xB2, 0x40, 0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, +0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0xB8, 0x00, 0xB0, +0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0xC6, 0x07, 0x30, 0x4E, 0x50, 0x82, 0xC0, 0x4F, 0x9C, 0xAE, 0xB0, +0x50, 0x42, 0xD9, 0xC0, 0x51, 0x7C, 0x90, 0xB0, 0x52, 0x2B, 0xF6, 0x40, 0x53, 0x5C, 0x72, 0xB0, +0x54, 0x0B, 0xD8, 0x40, 0x57, 0x37, 0xE6, 0x30, 0x57, 0xAF, 0xEC, 0xC0, 0x59, 0x17, 0xC8, 0x30, +0x59, 0x8F, 0xCE, 0xC0, 0x5A, 0xF7, 0xAA, 0x30, 0x5B, 0x6F, 0xB0, 0xC0, 0x5C, 0xA9, 0x67, 0xB0, +0x5D, 0x74, 0x7C, 0xC0, 0x5E, 0x89, 0x49, 0xB0, 0x5F, 0x54, 0x5E, 0xC0, 0x60, 0x69, 0x2B, 0xB0, +0x61, 0x34, 0x40, 0xC0, 0x62, 0x49, 0x0D, 0xB0, 0x63, 0x1D, 0x5D, 0x40, 0x64, 0x28, 0xEF, 0xB0, +0x64, 0xF4, 0x04, 0xC0, 0x66, 0x12, 0x0C, 0x30, 0x66, 0xDD, 0x21, 0x40, 0x67, 0xDB, 0x84, 0xB0, +0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, +0x02, 0x03, 0x04, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, +0x06, 0x05, 0x06, 0x05, 0x07, 0xFF, 0xFF, 0xBC, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBB, 0x00, +0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, +0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0xFF, +0xFF, 0xD5, 0xD0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x35, +0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, +0x08, 0x00, 0x00, 0x00, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1F, 0x10, 0xFF, 0xFF, 0xFF, +0xFF, 0x8F, 0x30, 0x47, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x5C, 0xE5, 0x50, 0xFF, 0xFF, 0xFF, +0xFF, 0x9F, 0x7C, 0xE2, 0xC5, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x71, 0xC0, 0xFF, 0xFF, 0xFF, +0xFF, 0xB0, 0x5E, 0x77, 0xC5, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x77, 0x3D, 0x40, 0xFF, 0xFF, 0xFF, +0xFF, 0xB2, 0x41, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x58, 0x70, 0xC0, 0xFF, 0xFF, 0xFF, +0xFF, 0xB4, 0x22, 0x34, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x39, 0xA4, 0x40, 0xFF, 0xFF, 0xFF, +0xFF, 0xB6, 0x03, 0x67, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, +0xFF, 0xB7, 0xE4, 0x9B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, +0xFF, 0xB9, 0xC7, 0x20, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x1C, 0x6E, 0x40, 0xFF, 0xFF, 0xFF, +0xFF, 0xCC, 0x6C, 0xE7, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x17, 0xE3, 0x40, 0xFF, 0xFF, 0xFF, +0xFF, 0xD5, 0x33, 0x55, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x76, 0x92, 0x40, 0xFF, 0xFF, 0xFF, +0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x49, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00, 0x09, 0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00, +0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x88, 0xD0, 0x30, 0x00, 0x00, 0x00, +0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x68, 0xB2, 0x30, 0x00, 0x00, 0x00, +0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x48, 0x94, 0x30, 0x00, 0x00, 0x00, +0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x28, 0x76, 0x30, 0x00, 0x00, 0x00, +0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x11, 0x92, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, +0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, +0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, +0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, +0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, +0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, +0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, +0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, +0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, +0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, +0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, +0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, +0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, +0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, +0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x57, 0x37, 0xE6, 0x30, 0x00, 0x00, 0x00, +0x00, 0x57, 0xAF, 0xEC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x59, 0x17, 0xC8, 0x30, 0x00, 0x00, 0x00, +0x00, 0x59, 0x8F, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xF7, 0xAA, 0x30, 0x00, 0x00, 0x00, +0x00, 0x5B, 0x6F, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0x67, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x5D, 0x74, 0x7C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x49, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x5F, 0x54, 0x5E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x2B, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x61, 0x34, 0x40, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x49, 0x0D, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x63, 0x1D, 0x5D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0xEF, 0xB0, 0x00, 0x00, 0x00, +0x00, 0x64, 0xF4, 0x04, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x12, 0x0C, 0x30, 0x00, 0x00, 0x00, +0x00, 0x66, 0xDD, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0xDB, 0x84, 0xB0, 0x01, 0x02, 0x01, +0x03, 0x01, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x04, +0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, +0x05, 0x07, 0xFF, 0xFF, 0xBC, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBB, 0x00, 0x04, 0xFF, 0xFF, +0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, +0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, +0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x35, 0x00, 0x2D, 0x30, +0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x0A, 0x00, 0x43, +0xCC, 0xC5, 0x00, 0xA4, 0xB1, 0x75, 0x00, 0x00, 0x00, 0x0C, 0x41, 0x79, 0x73, 0x65, 0x6E, 0x20, +0x52, 0x65, 0x67, 0x69, 0x6F, 0x6E, + /* America/Creston */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -38062,8 +38289,8 @@ const unsigned char timelib_timezone_db_data_builtin[711319] = { 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x35, 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x0A, 0x00, 0x38, -0x3A, 0x88, 0x00, 0xA6, 0x72, 0xAD, 0x00, 0x00, 0x00, 0x14, 0x52, 0x65, 0x67, 0x69, 0x6F, 0x6E, -0x20, 0x6F, 0x66, 0x20, 0x4D, 0x61, 0x67, 0x61, 0x6C, 0x6C, 0x61, 0x6E, 0x65, 0x73, +0x3A, 0x88, 0x00, 0xA6, 0x72, 0xAD, 0x00, 0x00, 0x00, 0x11, 0x4D, 0x61, 0x67, 0x61, 0x6C, 0x6C, +0x61, 0x6E, 0x65, 0x73, 0x20, 0x52, 0x65, 0x67, 0x69, 0x6F, 0x6E, /* America/Rainy_River */ 0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -47037,7 +47264,7 @@ const unsigned char timelib_timezone_db_data_builtin[711319] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1C, 0x9A, 0x6C, 0x7D, 0xC8, 0xBF, 0x00, 0xCC, 0x48, 0x0D, 0x94, 0x44, 0x38, 0x0E, 0xAD, 0x13, 0xB8, 0x0F, 0x79, 0x73, 0x40, -0x10, 0x28, 0xCA, 0xC0, 0x10, 0xED, 0x3A, 0x40, 0x11, 0xAD, 0xBC, 0x48, 0x12, 0x45, 0x4A, 0xB8, +0x10, 0x28, 0xCA, 0xC0, 0x10, 0xA9, 0xFD, 0xC0, 0x11, 0xAD, 0xBC, 0x48, 0x12, 0x45, 0x4A, 0xB8, 0x13, 0x37, 0xEC, 0xC8, 0x14, 0x2D, 0x15, 0xB8, 0x28, 0x20, 0x76, 0xC8, 0x28, 0xDB, 0x9D, 0xB8, 0x29, 0xCB, 0x9C, 0xC8, 0x2A, 0xBE, 0x22, 0xB8, 0x2B, 0xAC, 0xD0, 0x48, 0x2C, 0x9F, 0x56, 0x38, 0x2D, 0x8E, 0x03, 0xC8, 0x2E, 0x80, 0x89, 0xB8, 0x2F, 0x6F, 0x37, 0x48, 0x30, 0x61, 0xBD, 0x38, @@ -47068,7 +47295,7 @@ const unsigned char timelib_timezone_db_data_builtin[711319] = { 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x6C, 0x7D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x00, 0xCC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x94, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xAD, 0x13, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x79, 0x73, 0x40, 0x00, -0x00, 0x00, 0x00, 0x10, 0x28, 0xCA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x10, 0xED, 0x3A, 0x40, 0x00, +0x00, 0x00, 0x00, 0x10, 0x28, 0xCA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x10, 0xA9, 0xFD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xBC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x12, 0x45, 0x4A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x37, 0xEC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x14, 0x2D, 0x15, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x76, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x28, 0xDB, 0x9D, 0xB8, 0x00, @@ -65285,7 +65512,7 @@ const unsigned char timelib_timezone_db_data_builtin[711319] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1C, 0x9A, 0x6C, 0x7D, 0xC8, 0xBF, 0x00, 0xCC, 0x48, 0x0D, 0x94, 0x44, 0x38, 0x0E, 0xAD, 0x13, 0xB8, 0x0F, 0x79, 0x73, 0x40, -0x10, 0x28, 0xCA, 0xC0, 0x10, 0xED, 0x3A, 0x40, 0x11, 0xAD, 0xBC, 0x48, 0x12, 0x45, 0x4A, 0xB8, +0x10, 0x28, 0xCA, 0xC0, 0x10, 0xA9, 0xFD, 0xC0, 0x11, 0xAD, 0xBC, 0x48, 0x12, 0x45, 0x4A, 0xB8, 0x13, 0x37, 0xEC, 0xC8, 0x14, 0x2D, 0x15, 0xB8, 0x28, 0x20, 0x76, 0xC8, 0x28, 0xDB, 0x9D, 0xB8, 0x29, 0xCB, 0x9C, 0xC8, 0x2A, 0xBE, 0x22, 0xB8, 0x2B, 0xAC, 0xD0, 0x48, 0x2C, 0x9F, 0x56, 0x38, 0x2D, 0x8E, 0x03, 0xC8, 0x2E, 0x80, 0x89, 0xB8, 0x2F, 0x6F, 0x37, 0x48, 0x30, 0x61, 0xBD, 0x38, @@ -65316,7 +65543,7 @@ const unsigned char timelib_timezone_db_data_builtin[711319] = { 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x6C, 0x7D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x00, 0xCC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x94, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xAD, 0x13, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x79, 0x73, 0x40, 0x00, -0x00, 0x00, 0x00, 0x10, 0x28, 0xCA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x10, 0xED, 0x3A, 0x40, 0x00, +0x00, 0x00, 0x00, 0x10, 0x28, 0xCA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x10, 0xA9, 0xFD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xBC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x12, 0x45, 0x4A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x37, 0xEC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x14, 0x2D, 0x15, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x76, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x28, 0xDB, 0x9D, 0xB8, 0x00, @@ -70844,4 +71071,4 @@ const unsigned char timelib_timezone_db_data_builtin[711319] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2025.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2025.2", 598, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From d4c548cf42b5158b9e15fede483a15af0fb92f04 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 24 Mar 2025 15:07:14 +0100 Subject: [PATCH 63/65] Backport intl test changes for ICU 77 See GH-18125 See 8823f89a3282f1a77c2416779f9b0136c213e9fb --- ext/intl/tests/locale_get_display_name8.phpt | 12 ++++++------ ext/intl/tests/locale_get_display_variant2.phpt | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/intl/tests/locale_get_display_name8.phpt b/ext/intl/tests/locale_get_display_name8.phpt index e8c1ed958ac1c..aa91ee4c3b8ca 100644 --- a/ext/intl/tests/locale_get_display_name8.phpt +++ b/ext/intl/tests/locale_get_display_name8.phpt @@ -112,9 +112,9 @@ disp_locale=fr : display_name=slovène #Italie, NEDIS_KIRTI# disp_locale=de : display_name=Slowenisch #Italien, NEDIS_KIRTI# ----------------- locale='sl_IT_nedis-a-kirti-x-xyz' -disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI_X_XYZ# -disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI_X_XYZ# -disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI_X_XYZ# +disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI(_X_XYZ)?# +disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI(_X_XYZ)?# +disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI(_X_XYZ)?# ----------------- locale='sl_IT_rozaj' disp_locale=en : display_name=Slovenian #Italy, Resian# @@ -317,9 +317,9 @@ disp_locale=fr : display_name=anglais #États-Unis, attribute=islamcal# disp_locale=de : display_name=Englisch #Vereinigte Staaten, attribute=islamcal# ----------------- locale='zh-CN-a-myExt-x-private' -disp_locale=en : display_name=Chinese #China(, A_MYEXT_X_PRIVATE)?, a=myext, Private-Use=private# -disp_locale=fr : display_name=chinois #Chine(, A_MYEXT_X_PRIVATE)?, a=myext, usage privé=private# -disp_locale=de : display_name=Chinesisch #China(, A_MYEXT_X_PRIVATE)?, a=myext, Privatnutzung=private# +disp_locale=en : display_name=Chinese #China(, A_MYEXT(_X_PRIVATE)?)?, a=myext, Private-Use=private# +disp_locale=fr : display_name=chinois #Chine(, A_MYEXT(_X_PRIVATE)?)?, a=myext, usage privé=private# +disp_locale=de : display_name=Chinesisch #China(, A_MYEXT(_X_PRIVATE)?)?, a=myext, Privatnutzung=private# ----------------- locale='en-a-myExt-b-another' disp_locale=en : display_name=English #(A_MYEXT_B_ANOTHER, )?a=myext, b=another# diff --git a/ext/intl/tests/locale_get_display_variant2.phpt b/ext/intl/tests/locale_get_display_variant2.phpt index e56154902dde9..8e815e8c4e52a 100644 --- a/ext/intl/tests/locale_get_display_variant2.phpt +++ b/ext/intl/tests/locale_get_display_variant2.phpt @@ -248,9 +248,9 @@ disp_locale=fr : display_variant= disp_locale=de : display_variant= ----------------- locale='zh-CN-a-myExt-x-private' -disp_locale=en : display_variant=(A_MYEXT_X_PRIVATE)? -disp_locale=fr : display_variant=(A_MYEXT_X_PRIVATE)? -disp_locale=de : display_variant=(A_MYEXT_X_PRIVATE)? +disp_locale=en : display_variant=(A_MYEXT(_X_PRIVATE)?)? +disp_locale=fr : display_variant=(A_MYEXT(_X_PRIVATE)?)? +disp_locale=de : display_variant=(A_MYEXT(_X_PRIVATE)?)? ----------------- locale='en-a-myExt-b-another' disp_locale=en : display_variant=((A_)?MYEXT_B_ANOTHER)? From c45d608569c8ba886944c0a6ae3001015e7ef27b Mon Sep 17 00:00:00 2001 From: DanielEScherzer Date: Tue, 25 Mar 2025 11:20:12 -0700 Subject: [PATCH 64/65] Add myself as ext/reflection codeowner [skip ci] --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ba67073c6afb3..8f8273e0ef5ac 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -45,6 +45,7 @@ /ext/pdo_sqlite @SakiTakamachi /ext/pgsql @devnexen /ext/random @TimWolla @zeriyoshi +/ext/reflection @DanielEScherzer /ext/session @Girgias /ext/simplexml @nielsdos /ext/soap @nielsdos From 324861bdc2b93c0d2a1aac0d43cf2eb05b67ff67 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 8 Apr 2025 22:21:18 +0200 Subject: [PATCH 65/65] Update versions for PHP 8.3.20 --- NEWS | 2 +- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index caad04f9d0895..677aa87cb0e26 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.3.20 +10 Apr 2025, PHP 8.3.20 - Core: . Fixed bug GH-17961 (use-after-free during dl()'ed module class destruction). diff --git a/Zend/zend.h b/Zend/zend.h index 927088ea18706..6712f42b8d936 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.3.20-dev" +#define ZEND_VERSION "4.3.20" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index a94d4958492fd..426603c031c1a 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.3.20-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.3.20],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 3dee6de933251..20d69f0071ddf 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 20 -#define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.3.20-dev" +#define PHP_EXTRA_VERSION "" +#define PHP_VERSION "8.3.20" #define PHP_VERSION_ID 80320