From 717b75cb43c4f0b175463a31bae7da039bd41305 Mon Sep 17 00:00:00 2001 From: Eric Mann Date: Tue, 31 Dec 2024 08:46:21 -0800 Subject: [PATCH 01/54] PHP-8.3 is now for PHP-8.3.17-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 e8397f27c5d69..fb45141a67bc4 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.3.16 +?? ??? ????, PHP 8.3.17 + + +02 Jan 2025, PHP 8.3.16RC1 - Core: . Fixed bug GH-17106 (ZEND_MATCH_ERROR misoptimization). (ilutov) diff --git a/Zend/zend.h b/Zend/zend.h index 3fe973e663bea..0f73f888a6032 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.3.16-dev" +#define ZEND_VERSION "4.3.17-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index b6ec8b2be15fd..ee039a0bad50a 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.16-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.3.17-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 3521615c68fc9..f980e0328e8c3 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 16 +#define PHP_RELEASE_VERSION 17 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.3.16-dev" -#define PHP_VERSION_ID 80316 +#define PHP_VERSION "8.3.17-dev" +#define PHP_VERSION_ID 80317 From 919f1984d52298a51643ef4018013cdedc7bf887 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 1 Jan 2025 14:56:32 +0100 Subject: [PATCH 02/54] gh15937.phpt does not need to be an online test We convert the test to use the CLI test server to not require online availability. As of PHP 8.3, the test is supposed to fail, because the timeout is too large. Since exactly this scenario is already tested by gh16810.phpt, we drop the test for PHP-8.3 and up. Closes GH-17315. --- ext/standard/tests/streams/gh15937.phpt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ext/standard/tests/streams/gh15937.phpt b/ext/standard/tests/streams/gh15937.phpt index db0564342b13b..0a18f3ca907b4 100644 --- a/ext/standard/tests/streams/gh15937.phpt +++ b/ext/standard/tests/streams/gh15937.phpt @@ -1,16 +1,22 @@ --TEST-- GH-15937 (stream overflow on timeout setting) ---SKIPIF-- - --FILE-- [ 'timeout' => PHP_INT_MAX, ], ]; $ctx = stream_context_create($config); -var_dump(fopen("http://www.example.com/", "r", false, $ctx)); +var_dump(fopen("http://" . PHP_CLI_SERVER_ADDRESS . "/test", "r", false, $ctx)); ?> --EXPECTF-- resource(%d) of type (stream) From 412a6b2e082c187d1b980e410a6a00aa8117d46c Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 2 Jan 2025 22:05:01 +0100 Subject: [PATCH 03/54] Fix GH-16800: ftp functions can abort with EINTR This adds wrappers around recv(), send(), and php_pollfd_for_ms() to handle EINTR. This is a bit hard to test on its own, but it is testable manually using the following script: ```php pcntl_signal(SIGUSR1, function() { var_dump(func_get_args()); }, false); var_dump(getmypid()); sleep(10); $ftp = ftp_connect('127.0.0.1'); ftp_login($ftp, 'user', 'pass'); ftp_put($ftp, 'testfile', 'testfile'); ``` in combination with an infinite while loop that sends SIGUSR1 to the process. Closes GH-17327. --- NEWS | 2 ++ ext/ftp/ftp.c | 57 +++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index fb45141a67bc4..3bba53848bddf 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.17 +- FTP: + . Fixed bug GH-16800 (ftp functions can abort with EINTR). (nielsdos) 02 Jan 2025, PHP 8.3.16RC1 diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index a04f74836bd89..acdc1522e58fc 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1387,6 +1387,22 @@ ftp_getresp(ftpbuf_t *ftp) } /* }}} */ +static ssize_t my_send_wrapper_with_restart(php_socket_t fd, const void *buf, size_t size, int flags) { + ssize_t n; + do { + n = send(fd, buf, size, flags); + } while (n == -1 && php_socket_errno() == EINTR); + return n; +} + +static ssize_t my_recv_wrapper_with_restart(php_socket_t fd, void *buf, size_t size, int flags) { + ssize_t n; + do { + n = recv(fd, buf, size, flags); + } while (n == -1 && php_socket_errno() == EINTR); + return n; +} + int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { #ifdef HAVE_FTP_SSL int err; @@ -1402,7 +1418,7 @@ int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { handle = ftp->data->ssl_handle; fd = ftp->data->fd; } else { - return send(s, buf, size, 0); + return my_send_wrapper_with_restart(s, buf, size, 0); } do { @@ -1441,8 +1457,33 @@ int single_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t size) { } while (retry); return sent; #else - return send(s, buf, size, 0); + return my_send_wrapper_with_restart(s, buf, size, 0); +#endif +} + +static int my_poll(php_socket_t fd, int events, int timeout) { + int n; + zend_hrtime_t timeout_hr = (zend_hrtime_t) timeout * 1000000; + + while (true) { + zend_hrtime_t start_ns = zend_hrtime(); + n = php_pollfd_for_ms(fd, events, (int) (timeout_hr / 1000000)); + + if (n == -1 && php_socket_errno() == EINTR) { + zend_hrtime_t delta_ns = zend_hrtime() - start_ns; + if (delta_ns > timeout_hr) { +#ifndef PHP_WIN32 + errno = ETIMEDOUT; #endif + break; + } + timeout_hr -= delta_ns; + } else { + break; + } + } + + return n; } /* {{{ my_send */ @@ -1454,7 +1495,7 @@ my_send(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) size = len; while (size) { - n = php_pollfd_for_ms(s, POLLOUT, ftp->timeout_sec * 1000); + n = my_poll(s, POLLOUT, ftp->timeout_sec * 1000); if (n < 1) { char buf[256]; @@ -1493,7 +1534,7 @@ my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) SSL *handle = NULL; php_socket_t fd; #endif - n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); + n = my_poll(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); if (n < 1) { char buf[256]; if (n == 0) { @@ -1553,7 +1594,7 @@ my_recv(ftpbuf_t *ftp, php_socket_t s, void *buf, size_t len) } while (retry); } else { #endif - nr_bytes = recv(s, buf, len, 0); + nr_bytes = my_recv_wrapper_with_restart(s, buf, len, 0); #ifdef HAVE_FTP_SSL } #endif @@ -1567,7 +1608,7 @@ data_available(ftpbuf_t *ftp, php_socket_t s) { int n; - n = php_pollfd_for_ms(s, PHP_POLLREADABLE, 1000); + n = my_poll(s, PHP_POLLREADABLE, 1000); if (n < 1) { char buf[256]; if (n == 0) { @@ -1590,7 +1631,7 @@ data_writeable(ftpbuf_t *ftp, php_socket_t s) { int n; - n = php_pollfd_for_ms(s, POLLOUT, 1000); + n = my_poll(s, POLLOUT, 1000); if (n < 1) { char buf[256]; if (n == 0) { @@ -1614,7 +1655,7 @@ my_accept(ftpbuf_t *ftp, php_socket_t s, struct sockaddr *addr, socklen_t *addrl { int n; - n = php_pollfd_for_ms(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); + n = my_poll(s, PHP_POLLREADABLE, ftp->timeout_sec * 1000); if (n < 1) { char buf[256]; if (n == 0) { From a970eefb6c6a3771d0b046b0f75870376e13d00c Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 3 Jan 2025 16:40:21 +0100 Subject: [PATCH 04/54] Fix GH-11874: intl causing segfault in docker images The segfault happens because zoi->wrapping_obj points to an object that has been freed. This wrapping_obj is set in IntlIterator_from_StringEnumeration(). Notice how the refcount is not increased in this function. By switching to ZVAL_OBJ_COPY, the segfault disappears. We also need to move the responsibility of destroying the iterator to the iterator itself and keep the object data destruction in the object destruction. The existing code used a weird recursive destruction between the iterator and object that was too hard to understand to be honest. This patch simplifies everything and in the process gets rid of the leak. Iterators that are embedded are now responsible for their own memory cleanup. Closes GH-17343. --- NEWS | 3 ++ .../breakiterator/breakiterator_iterators.cpp | 16 +++++++++-- ext/intl/common/common_enum.cpp | 27 +++--------------- ext/intl/tests/gh11874.phpt | 28 +++++++++++++++++++ 4 files changed, 49 insertions(+), 25 deletions(-) create mode 100644 ext/intl/tests/gh11874.phpt diff --git a/NEWS b/NEWS index 3bba53848bddf..2ad9dcdca3fd9 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ PHP NEWS - FTP: . Fixed bug GH-16800 (ftp functions can abort with EINTR). (nielsdos) +- Intl: + . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) + 02 Jan 2025, PHP 8.3.16RC1 - Core: diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp index b95238a24b912..ac0664bb21239 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.cpp +++ b/ext/intl/breakiterator/breakiterator_iterators.cpp @@ -51,6 +51,7 @@ inline BreakIterator *_breakiter_prolog(zend_object_iterator *iter) static void _breakiterator_destroy_it(zend_object_iterator *iter) { zval_ptr_dtor(&iter->data); + /* Don't free iter here because it is allocated as an object on its own, not embedded. */ } static void _breakiterator_move_forward(zend_object_iterator *iter) @@ -79,8 +80,18 @@ static void _breakiterator_rewind(zend_object_iterator *iter) ZVAL_LONG(&zoi_iter->current, (zend_long)pos); } +static void zoi_with_current_dtor_self(zend_object_iterator *iter) +{ + // Note: wrapping_obj is unused, call to zoi_with_current_dtor() not necessary + zoi_with_current *zoi_iter = (zoi_with_current*)iter; + ZEND_ASSERT(Z_ISUNDEF(zoi_iter->wrapping_obj)); + + // Unlike the other iterators, this iterator is a new, standalone instance + zoi_iter->destroy_it(iter); +} + static const zend_object_iterator_funcs breakiterator_iterator_funcs = { - zoi_with_current_dtor, + zoi_with_current_dtor_self, zoi_with_current_valid, zoi_with_current_get_current_data, NULL, @@ -133,6 +144,7 @@ typedef struct zoi_break_iter_parts { static void _breakiterator_parts_destroy_it(zend_object_iterator *iter) { zval_ptr_dtor(&iter->data); + efree(iter); } static void _breakiterator_parts_get_current_key(zend_object_iterator *iter, zval *key) @@ -231,7 +243,7 @@ void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv, ii->iterator->index = 0; ((zoi_with_current*)ii->iterator)->destroy_it = _breakiterator_parts_destroy_it; - ZVAL_OBJ(&((zoi_with_current*)ii->iterator)->wrapping_obj, Z_OBJ_P(object)); + ZVAL_OBJ_COPY(&((zoi_with_current*)ii->iterator)->wrapping_obj, Z_OBJ_P(object)); ZVAL_UNDEF(&((zoi_with_current*)ii->iterator)->current); ((zoi_break_iter_parts*)ii->iterator)->bio = Z_INTL_BREAKITERATOR_P(break_iter_zv); diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp index 874c748d58b70..a527279558ed6 100644 --- a/ext/intl/common/common_enum.cpp +++ b/ext/intl/common/common_enum.cpp @@ -35,25 +35,7 @@ zend_object_handlers IntlIterator_handlers; void zoi_with_current_dtor(zend_object_iterator *iter) { zoi_with_current *zoiwc = (zoi_with_current*)iter; - - if (!Z_ISUNDEF(zoiwc->wrapping_obj)) { - /* we have to copy the pointer because zoiwc->wrapping_obj may be - * changed midway the execution of zval_ptr_dtor() */ - zval *zwo = &zoiwc->wrapping_obj; - - /* object is still here, we can rely on it to call this again and - * destroy this object */ - zval_ptr_dtor(zwo); - } else { - /* Object not here anymore (we've been called by the object free handler) - * Note that the iterator wrapper objects (that also depend on this - * structure) call this function earlier, in the destruction phase, which - * precedes the object free phase. Therefore there's no risk on this - * function being called by the iterator wrapper destructor function and - * not finding the memory of this iterator allocated anymore. */ - iter->funcs->invalidate_current(iter); - zoiwc->destroy_it(iter); - } + zval_ptr_dtor(&zoiwc->wrapping_obj); } U_CFUNC int zoi_with_current_valid(zend_object_iterator *iter) @@ -124,6 +106,7 @@ static void string_enum_rewind(zend_object_iterator *iter) static void string_enum_destroy_it(zend_object_iterator *iter) { delete (StringEnumeration*)Z_PTR(iter->data); + efree(iter); } static const zend_object_iterator_funcs string_enum_object_iterator_funcs = { @@ -148,7 +131,7 @@ U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *ob ii->iterator->funcs = &string_enum_object_iterator_funcs; ii->iterator->index = 0; ((zoi_with_current*)ii->iterator)->destroy_it = string_enum_destroy_it; - ZVAL_OBJ(&((zoi_with_current*)ii->iterator)->wrapping_obj, Z_OBJ_P(object)); + ZVAL_OBJ_COPY(&((zoi_with_current*)ii->iterator)->wrapping_obj, Z_OBJ_P(object)); ZVAL_UNDEF(&((zoi_with_current*)ii->iterator)->current); } @@ -157,9 +140,7 @@ static void IntlIterator_objects_free(zend_object *object) IntlIterator_object *ii = php_intl_iterator_fetch_object(object); if (ii->iterator) { - zval *wrapping_objp = &((zoi_with_current*)ii->iterator)->wrapping_obj; - ZVAL_UNDEF(wrapping_objp); - zend_iterator_dtor(ii->iterator); + ((zoi_with_current*)ii->iterator)->destroy_it(ii->iterator); } intl_error_reset(INTLITERATOR_ERROR_P(ii)); diff --git a/ext/intl/tests/gh11874.phpt b/ext/intl/tests/gh11874.phpt new file mode 100644 index 0000000000000..4b44cfb157be1 --- /dev/null +++ b/ext/intl/tests/gh11874.phpt @@ -0,0 +1,28 @@ +--TEST-- +GH-11874 (intl causing segfault in docker images) +--EXTENSIONS-- +intl +--FILE-- + 0); +echo "No crash\n"; + +?> +--EXPECT-- +string(7) "persian" +string(9) "gregorian" +string(7) "islamic" +string(13) "islamic-civil" +string(12) "islamic-tbla" +bool(true) +No crash From 2c658f422dada64841179f2ad46361d37aae02f2 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 4 Jan 2025 00:11:56 +0100 Subject: [PATCH 05/54] Fix GH-17349: Tiled truecolor filling looses single color transparency This is porting the relevant part of a previous upstream commit[1] to align the behavior of our bundled libgd with upstream. It should be noted that this only works if the image actually has a transparent color. [1] Closes GH-17351. --- NEWS | 4 ++++ ext/gd/libgd/gd.c | 4 +++- ext/gd/tests/gh17349.phpt | 27 +++++++++++++++++++++++++++ ext/gd/tests/gh17349.png | Bin 0 -> 417 bytes 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ext/gd/tests/gh17349.phpt create mode 100644 ext/gd/tests/gh17349.png diff --git a/NEWS b/NEWS index 2ad9dcdca3fd9..ac262fcb1bbf0 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,10 @@ PHP NEWS - FTP: . Fixed bug GH-16800 (ftp functions can abort with EINTR). (nielsdos) +- GD: + . Fixed bug GH-17349 (Tiled truecolor filling looses single color + transparency). (cmb) + - Intl: . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 2664288162a7a..7265758696ad3 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -960,7 +960,9 @@ static int gdImageTileGet (gdImagePtr im, int x, int y) srcy = y % gdImageSY(im->tile); p = gdImageGetPixel(im->tile, srcx, srcy); - if (im->trueColor) { + if (p == im->tile->transparent) { + tileColor = im->transparent; + } else if (im->trueColor) { if (im->tile->trueColor) { tileColor = p; } else { diff --git a/ext/gd/tests/gh17349.phpt b/ext/gd/tests/gh17349.phpt new file mode 100644 index 0000000000000..cd0fc4317b59b --- /dev/null +++ b/ext/gd/tests/gh17349.phpt @@ -0,0 +1,27 @@ +--TEST-- +GH-17349 (Tiled truecolor filling looses single color transparency) +--EXTENSIONS-- +gd +--FILE-- + +--EXPECT-- +The images are equal. diff --git a/ext/gd/tests/gh17349.png b/ext/gd/tests/gh17349.png new file mode 100644 index 0000000000000000000000000000000000000000..dd75d9df990434a3ec85f54cbcd0155ea77e6df5 GIT binary patch literal 417 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1SD0tpLGH$wvr&fV21x7XdWS53l!lj@Q5sC zVBk9f!i-b3`J@>b7#%%b978f1-_CLrJFLLrvT^I*kdm}kabwwigeb{}jh*OmH zx2qWMmTl5=!%RO;jk=gUb*kir+={8cn!X>n`-*YFcR!m}{fANp0sS7f8+c}{ba#<^ z#@2IHxrYDYb0=YDy|euW&I@=fR=HcqeJWG@{>*)uqKfZ>3D4YL2uxBF=;&eVlVad7 z~T7tN*NWY?>>+YehzN((4_)8JhevxMlso7Jp`xce)+OH)oPLFoYRAUHx3v IIVCg!08N{xlmGw# literal 0 HcmV?d00001 From ee2faaa42330305cd02d639b7ee8536824ce09ad Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 4 Jan 2025 14:56:23 +0100 Subject: [PATCH 06/54] Handle GC cycles properly in intl iterators This is a follow-up on GH-17343 to implement GC cycle management. Previously the objects lived too long due to the strong cycle. This patch adds get_gc handlers to break the cycle. Closes GH-17355. --- .../breakiterator/breakiterator_iterators.cpp | 3 +- ext/intl/common/common_enum.cpp | 43 +++++++++++++++++-- ext/intl/common/common_enum.h | 1 + .../tests/IntlIterator_cycle_management.phpt | 19 ++++++++ 4 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 ext/intl/tests/IntlIterator_cycle_management.phpt diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp index ac0664bb21239..4bf149e07c75e 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.cpp +++ b/ext/intl/breakiterator/breakiterator_iterators.cpp @@ -144,7 +144,6 @@ typedef struct zoi_break_iter_parts { static void _breakiterator_parts_destroy_it(zend_object_iterator *iter) { zval_ptr_dtor(&iter->data); - efree(iter); } static void _breakiterator_parts_get_current_key(zend_object_iterator *iter, zval *key) @@ -223,7 +222,7 @@ static const zend_object_iterator_funcs breakiterator_parts_it_funcs = { _breakiterator_parts_move_forward, _breakiterator_parts_rewind, zoi_with_current_invalidate_current, - NULL, /* get_gc */ + zoi_with_current_get_gc, }; void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv, diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp index a527279558ed6..5d77c3f5336c2 100644 --- a/ext/intl/common/common_enum.cpp +++ b/ext/intl/common/common_enum.cpp @@ -36,6 +36,7 @@ void zoi_with_current_dtor(zend_object_iterator *iter) { zoi_with_current *zoiwc = (zoi_with_current*)iter; zval_ptr_dtor(&zoiwc->wrapping_obj); + ZVAL_UNDEF(&zoiwc->wrapping_obj); } U_CFUNC int zoi_with_current_valid(zend_object_iterator *iter) @@ -80,6 +81,14 @@ static void string_enum_current_move_forward(zend_object_iterator *iter) } //else we've reached the end of the enum, nothing more is required } +HashTable *zoi_with_current_get_gc(zend_object_iterator *iter, zval **table, int *n) +{ + zoi_with_current *zoiwc = reinterpret_cast(iter); + *table = &zoiwc->wrapping_obj; + *n = 1; + return nullptr; +} + static void string_enum_rewind(zend_object_iterator *iter) { zoi_with_current *zoi_iter = (zoi_with_current*)iter; @@ -106,7 +115,6 @@ static void string_enum_rewind(zend_object_iterator *iter) static void string_enum_destroy_it(zend_object_iterator *iter) { delete (StringEnumeration*)Z_PTR(iter->data); - efree(iter); } static const zend_object_iterator_funcs string_enum_object_iterator_funcs = { @@ -117,7 +125,7 @@ static const zend_object_iterator_funcs string_enum_object_iterator_funcs = { string_enum_current_move_forward, string_enum_rewind, zoi_with_current_invalidate_current, - NULL, /* get_gc */ + zoi_with_current_get_gc, }; U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object) @@ -135,18 +143,43 @@ U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *ob ZVAL_UNDEF(&((zoi_with_current*)ii->iterator)->current); } -static void IntlIterator_objects_free(zend_object *object) +static void IntlIterator_objects_dtor(zend_object *object) { IntlIterator_object *ii = php_intl_iterator_fetch_object(object); - if (ii->iterator) { ((zoi_with_current*)ii->iterator)->destroy_it(ii->iterator); + OBJ_RELEASE(&ii->iterator->std); + ii->iterator = NULL; } +} + +static void IntlIterator_objects_free(zend_object *object) +{ + IntlIterator_object *ii = php_intl_iterator_fetch_object(object); + intl_error_reset(INTLITERATOR_ERROR_P(ii)); zend_object_std_dtor(&ii->zo); } +static HashTable *IntlIterator_object_get_gc(zend_object *obj, zval **table, int *n) +{ + IntlIterator_object *ii = php_intl_iterator_fetch_object(obj); + if (ii->iterator) { + zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create(); + zend_get_gc_buffer_add_obj(gc_buffer, &ii->iterator->std); + zend_get_gc_buffer_use(gc_buffer, table, n); + } else { + *table = nullptr; + *n = 0; + } + if (obj->properties == nullptr && obj->ce->default_properties_count == 0) { + return nullptr; + } else { + return zend_std_get_properties(obj); + } +} + static zend_object_iterator *IntlIterator_get_iterator( zend_class_entry *ce, zval *object, int by_ref) { @@ -273,7 +306,9 @@ U_CFUNC void intl_register_common_symbols(int module_number) sizeof IntlIterator_handlers); IntlIterator_handlers.offset = XtOffsetOf(IntlIterator_object, zo); IntlIterator_handlers.clone_obj = NULL; + IntlIterator_handlers.dtor_obj = IntlIterator_objects_dtor; IntlIterator_handlers.free_obj = IntlIterator_objects_free; + IntlIterator_handlers.get_gc = IntlIterator_object_get_gc; register_common_symbols(module_number); } diff --git a/ext/intl/common/common_enum.h b/ext/intl/common/common_enum.h index ebe5cbfbfa3b8..9af71cd06c90b 100644 --- a/ext/intl/common/common_enum.h +++ b/ext/intl/common/common_enum.h @@ -71,6 +71,7 @@ U_CFUNC void zoi_with_current_dtor(zend_object_iterator *iter); U_CFUNC int zoi_with_current_valid(zend_object_iterator *iter); U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter); U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter); +U_CFUNC HashTable *zoi_with_current_get_gc(zend_object_iterator *iter, zval **table, int *n); #ifdef __cplusplus using icu::StringEnumeration; diff --git a/ext/intl/tests/IntlIterator_cycle_management.phpt b/ext/intl/tests/IntlIterator_cycle_management.phpt new file mode 100644 index 0000000000000..ec6aa889f3bee --- /dev/null +++ b/ext/intl/tests/IntlIterator_cycle_management.phpt @@ -0,0 +1,19 @@ +--TEST-- +IntlIterator cycle management +--EXTENSIONS-- +intl +--FILE-- + +--EXPECT-- +int(1) +int(1) +int(1) From cd4481422b674496301a7e30f11c066122814163 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 3 Jan 2025 11:41:11 +0000 Subject: [PATCH 07/54] Fix GH-17330: SNMP::setSecurity segfaults when object had been closed. checking when the workflow needs to deal with an existing SNMP session. close GH-17337 --- NEWS | 4 ++++ ext/snmp/snmp.c | 4 ++++ ext/snmp/tests/gh17330.phpt | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 ext/snmp/tests/gh17330.phpt diff --git a/NEWS b/NEWS index ac262fcb1bbf0..911e91074e910 100644 --- a/NEWS +++ b/NEWS @@ -98,6 +98,10 @@ PHP NEWS . Fixed bug GH-17153 (SimpleXML crash when using autovivification on document). (nielsdos) +- SNMP: + . Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session). + (David Carlier) + - Sockets: . Fixed bug GH-16276 (socket_strerror overflow handling with INT_MIN). (David Carlier / cmb) diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 2e18d8e0128a6..b5bb9f91745c6 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -1660,6 +1660,10 @@ PHP_METHOD(SNMP, setSecurity) zend_string *a1 = NULL, *a2 = NULL, *a3 = NULL, *a4 = NULL, *a5 = NULL, *a6 = NULL, *a7 = NULL; snmp_object = Z_SNMP_P(object); + if (!snmp_object->session) { + zend_throw_error(NULL, "Invalid or uninitialized SNMP object"); + RETURN_THROWS(); + } if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|SSSSSS", &a1, &a2, &a3, &a4,&a5, &a6, &a7) == FAILURE) { RETURN_THROWS(); diff --git a/ext/snmp/tests/gh17330.phpt b/ext/snmp/tests/gh17330.phpt new file mode 100644 index 0000000000000..a6f077a9c8600 --- /dev/null +++ b/ext/snmp/tests/gh17330.phpt @@ -0,0 +1,18 @@ +--TEST-- +SNMP::setSecurity() segfault when the object had been closed. +--EXTENSIONS-- +snmp +--CREDITS-- +YuanchengJiang +--FILE-- +close(); +try { + $session->setSecurity('authPriv', 'MD5', '', 'AES', ''); +} catch(Error $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +Invalid or uninitialized SNMP object From 888551390e783e50ac8974107ffb7857f8ecb98b Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 5 Jan 2025 13:44:17 +0000 Subject: [PATCH 08/54] [skip ci] NEWS fix --- NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 911e91074e910..922452e4bf6df 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ PHP NEWS - Intl: . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) +- SNMP: + . Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session). + (David Carlier) + 02 Jan 2025, PHP 8.3.16RC1 - Core: @@ -98,10 +102,6 @@ PHP NEWS . Fixed bug GH-17153 (SimpleXML crash when using autovivification on document). (nielsdos) -- SNMP: - . Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session). - (David Carlier) - - Sockets: . Fixed bug GH-16276 (socket_strerror overflow handling with INT_MIN). (David Carlier / cmb) From 9e1b58274e55161ff57e6efe3584235b8754d605 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 31 Dec 2024 13:39:33 +0100 Subject: [PATCH 09/54] Test stream_context_tcp_nodelay_server on Windows Closes GH-17308 --- .github/scripts/windows/test_task.bat | 3 ++- .../tests/streams/stream_context_tcp_nodelay_server.phpt | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index c4ac5c0de4588..29cf1e4f2b610 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -97,8 +97,9 @@ rem generate php.ini echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini -rem work-around for some spawned PHP processes requiring OpenSSL +rem work-around for some spawned PHP processes requiring OpenSSL and sockets echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini +echo extension=php_sockets.dll >> %PHP_BUILD_DIR%\php.ini rem remove ext dlls for which tests are not supported for %%i in (imap ldap oci8_12c pdo_firebird pdo_oci snmp) do ( diff --git a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt index 6f656ca15f9cc..e20e294180ccc 100644 --- a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt +++ b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt @@ -5,9 +5,6 @@ sockets --SKIPIF-- --FILE-- run($clientCode, $serverCode); ?> ---EXPECT-- +--EXPECTF-- server-delay:conn-nodelay + From 5b72f12c565594bdd1e242bfb7c15c7d20c785de Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Wed, 1 Jan 2025 11:20:23 +0100 Subject: [PATCH 10/54] Rewrite http gh16810 test to not be online Closes GH-17314 --- ext/standard/tests/http/gh16810.phpt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ext/standard/tests/http/gh16810.phpt b/ext/standard/tests/http/gh16810.phpt index 4aa563b57b270..6feab1fb01f86 100644 --- a/ext/standard/tests/http/gh16810.phpt +++ b/ext/standard/tests/http/gh16810.phpt @@ -1,16 +1,23 @@ --TEST-- -Bug #79265 variation: "host:" not at start of header +GH-16809 (fopen HTTP wrapper timeout stream context option overflow) --INI-- allow_url_fopen=1 --SKIPIF-- --FILE-- [ -'timeout' => PHP_INT_MIN, -], + 'http' => [ + 'timeout' => PHP_INT_MIN, + ], ]; $ctx = stream_context_create($config); var_dump(fopen($uri, "r", false, $ctx)); @@ -22,5 +29,5 @@ var_dump(fopen($uri, "r", false, $ctx)); --EXPECTF-- resource(%d) of type (stream) -Warning: fopen(http://www.example.com): Failed to open stream: timeout must be lower than %d in %s on line %d +Warning: fopen(http://%s): Failed to open stream: timeout must be lower than %d in %s on line %d bool(false) From ec90367cd8bf48861325bb2b75971825983e3887 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 6 Jan 2025 02:00:11 +0100 Subject: [PATCH 11/54] Fix GH-17373: imagefttext() ignores clipping rect for palette images We apply the same fix that has been applied to external libgd at least as of 2.0.29. To avoid issues regarding minor FreeType rendering differences, the test case does not compare against an image, but rather checks that all pixels outside the clipping rect have the background color. Closes GH-17374. --- NEWS | 2 ++ ext/gd/libgd/gdft.c | 4 ++-- ext/gd/tests/gh17373.phpt | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ext/gd/tests/gh17373.phpt diff --git a/NEWS b/NEWS index 922452e4bf6df..a1e5a2cb247dd 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ PHP NEWS - GD: . Fixed bug GH-17349 (Tiled truecolor filling looses single color transparency). (cmb) + . Fixed bug GH-17373 (imagefttext() ignores clipping rect for palette + images). (cmb) - Intl: . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index 6876ca6f6b428..953da001bbe49 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -720,7 +720,7 @@ static char * gdft_draw_bitmap (gdCache_head_t *tc_cache, gdImage * im, int fg, y = pen_y + row; /* clip if out of bounds */ - if (y >= im->sy || y < 0) { + if (y > im->cy2 || y < im->cy1) { continue; } @@ -743,7 +743,7 @@ static char * gdft_draw_bitmap (gdCache_head_t *tc_cache, gdImage * im, int fg, x = pen_x + col; /* clip if out of bounds */ - if (x >= im->sx || x < 0) { + if (x > im->cx2 || x < im->cx1) { continue; } /* get pixel location in gd buffer */ diff --git a/ext/gd/tests/gh17373.phpt b/ext/gd/tests/gh17373.phpt new file mode 100644 index 0000000000000..354cdd07362b2 --- /dev/null +++ b/ext/gd/tests/gh17373.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug GH-17373 (imagefttext() ignores clipping rect for palette images) +--EXTENSIONS-- +gd +--FILE-- + +--EXPECT-- +int(0) From 47683487f8fafaa039ba7a766d05540b87728cde Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 6 Jan 2025 13:02:10 +0100 Subject: [PATCH 12/54] Fix libgd 223: gdImageRotateGeneric() does not properly interpolate We port the respective upstream fix[1]. We only run the test against bundled libgd, since external libgd may yield different results. Cf. . Closes GH-17380. --- NEWS | 2 ++ ext/gd/libgd/gd_interpolation.c | 20 ++++---------------- ext/gd/tests/gd223.phpt | 26 ++++++++++++++++++++++++++ ext/gd/tests/gd223.png | Bin 0 -> 9721 bytes 4 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 ext/gd/tests/gd223.phpt create mode 100644 ext/gd/tests/gd223.png diff --git a/NEWS b/NEWS index a1e5a2cb247dd..d916d36807be1 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ PHP NEWS transparency). (cmb) . Fixed bug GH-17373 (imagefttext() ignores clipping rect for palette images). (cmb) + . Ported fix for libgd 223 (gdImageRotateGeneric() does not properly + interpolate). (cmb) - Intl: . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 4b1583a8d6e82..bc1b3d344e69e 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -748,8 +748,8 @@ static int getPixelInterpolateWeight(gdImagePtr im, const double x, const double */ int getPixelInterpolated(gdImagePtr im, const double x, const double y, const int bgColor) { - const int xi=(int)((x) < 0 ? x - 1: x); - const int yi=(int)((y) < 0 ? y - 1: y); + const int xi=(int)(x); + const int yi=(int)(y); int yii; int i; double kernel, kernel_cache_y; @@ -1713,13 +1713,6 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b int new_width, new_height; gdRect bbox; - const gdFixed f_slop_y = f_sin; - const gdFixed f_slop_x = f_cos; - const gdFixed f_slop = f_slop_x > 0 && f_slop_y > 0 ? - (f_slop_x > f_slop_y ? gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y)) - : 0; - - if (bgColor < 0) { return NULL; } @@ -1745,15 +1738,10 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b long m = gd_fxtoi(f_m); long n = gd_fxtoi(f_n); - if ((n <= 0) || (m <= 0) || (m >= src_h) || (n >= src_w)) { + if (m < -1 || n < -1 || m >= src_h || n >= src_w ) { dst->tpixels[dst_offset_y][dst_offset_x++] = bgColor; - } else if ((n <= 1) || (m <= 1) || (m >= src_h - 1) || (n >= src_w - 1)) { - register int c = getPixelInterpolated(src, n, m, bgColor); - c = c | (( gdTrueColorGetAlpha(c) + ((int)(127* gd_fxtof(f_slop)))) << 24); - - dst->tpixels[dst_offset_y][dst_offset_x++] = _color_blend(bgColor, c); } else { - dst->tpixels[dst_offset_y][dst_offset_x++] = getPixelInterpolated(src, n, m, bgColor); + dst->tpixels[dst_offset_y][dst_offset_x++] = getPixelInterpolated(src, gd_fxtod(f_n), gd_fxtod(f_m), bgColor); } } dst_offset_y++; diff --git a/ext/gd/tests/gd223.phpt b/ext/gd/tests/gd223.phpt new file mode 100644 index 0000000000000..c378ab199ac50 --- /dev/null +++ b/ext/gd/tests/gd223.phpt @@ -0,0 +1,26 @@ +--TEST-- +libgd bug 223 (gdImageRotateGeneric() does not properly interpolate) +--EXTENSIONS-- +gd +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The images are equal. diff --git a/ext/gd/tests/gd223.png b/ext/gd/tests/gd223.png new file mode 100644 index 0000000000000000000000000000000000000000..02e10e2cc3a13c8adc43b00ac7441bd6d83959f7 GIT binary patch literal 9721 zcmW++2Rv2p8^2`l>`fAqRs8Jiy+u~Cv$9vn-dmZ;DvC0*GUG}i`;ug@jL6K4%m2Cm z&xcDn=bm%k_j$hSx$$~Bs-#4WL&FX4BrjzOQUgP*Vo!DD1GQi9C<==>&w0C>Y0r?azsaJMSWVE8eACVZ_COS7XF#lLZZ0JfpZxQ09|d~W?(n-$cR%)A(KM#> z8ai&e%*x*}y(nV4(&RqO+Oo97qfYtQ+1XKq@wZpA|DT_?i6W4MR9w5WPv&nREJD$T zGhUbID4zWbVypA{Uvy->%RPUq3xgC8d^|i0!o$*v@)S)@V_X)&hvPU%OZ0{@vzQw* z*6u=QWc~D(2t5g3c^L+yoY?GxuH^dr<}1+Z$tz(_N)GtrSsFjPD1o>3l75t zgC9N!!Nv3Pn7O#Q#}++=CG-823dg@EMOjlBH%s6l zQR!HGcehG~c{62jaPYH7494c3xMk(#SFc_Tk0z#DT1OT44h?mGe{Y~~W|n}ftQ>b3 zSTkjX{P-7L-0r;Q9n&h!>gDllWRro7ZMdwA7keQBm-wWc$(;hh7II=e=Qr(&gVdEd zjY{X%E#XOUad&r6QzNJ}x^;GT_I})1!hV20%h;Hzs5hSuNhQ6pM*b_{uXy#lxDS&} zjwp`qFJDF+MZA`~lfQ2sQY$}~^83S%fJfY#ZZs$#A9ZW=9(?&;08+=JB#m^r;eE9vhPf~L7BV}b=ERXG(=JV6xP#r|jZYO>~ zKYt?yLiT)Dadma|9<{Qlh{(w1;iyf`hvMQ$#^e}vb#=a*H?JWCOlzYA+xCgDJkA0_ z(uVnaPfyQJ`vs{Ykdt)|e?LyU6?3Z3wD{gC)ydb8r#LCML?^s{{Tc_EDtqw)-i9kZ zKJ=uEjUX&OK0fH;bnRvW2c4kB0F!&$^EA%A*RiZiU*f3DYC1Rrry}pEUzRLnS(;#S@z=zrLk25a2*{^`x>5Cnb@<(!=8F0Q8#EG)FsE8+lV{B|p!um6gMw(K`{4g}t=#rlS6=Pq| zWu|;p+N1W90pTPyU2a4OEKU8SOU9#|r$>KYvlAQyemWm?4^c!6^!G1!k;`i7QwRJV z6!ZR;c7qxx{PJSwa_G$)PV9xyi?z^EyF2>Ds9nL(Q(~-zMaHMn1tbAuO@ERLLd zT2lx*&{>2Lmh^G;r!2DANca+V7_xJ8A?dV7lE{BMWjD)f$ASPDS)g>RW7Y>qP zYiVg&@M^YdoJNh0M~{r?@gzjd%~{}JV`a|aVq=kzkjRyeb?zJ&x3)6TCgQTD;^*h* zd$i7em~>g+*idMiAg*a;y0mXt>a06l?r?UnU3DhKtF2Bg8dGna9xNze?W-NAsNmb4 zZcIfq*$*;atgFg$Almo)Zke|SNnm{_DvGe}PI_%rzJf#|04)?16(>bMAc9XPU?)Bgx z+0LuA=&~*PT%XKqJ2sd%d0bl?$Wg2`>Ob3VO@%##cMHk|!NN3H2B;zoQCRM8+bCQ;dphZgX4uX9_wS4QtWzi`D2z-^C8VWMIyRUc93K~d{75@EIEXoGcULHd zMJgsMi&i{eCnGz1`DcwS0S>mf?*=s)vpAx9A~7Y4HsjBH>Jw>J6G^G(=zOd_nzJhV za>@nOoeo`h1#Db-tAGFrSY>`%;{Luq9s+EGd-qP}p6*;lWb;4hcAfrs6~PvI?m1L& zHy3eIDvOT4efu^5cuxvTai`U*u0_3D&44GFC6#6k3AtkKTnL%7KXrMxZSk-?h70bJ z;9vtHWM*bUR~`6EOM5IJusi^{g0>na2*Si>eW={$K7>DeQ^$24D#l(~vcKLLiG#dp zP_pYFd&YpZdo=C7Hr4Q$Fs$R`tKf_5Y*hqc>+6Zlw-(h7zP|rGGPPGy!jZi^_r_j; z4L$ixEJ%UaY1tI8crxpYqr%$^%SwfS=UVrXe9uFqTOh5jo(3IRzPbr*y#KzmfCC}3 zi@ai9V}pyed)#q(7oJN~p2Eb`RK0v$qi%9wxuGG-VwhV{?U}=HNsoQ;UCEbq_JbTk zX-wGy4>e4)ZmLse^O-7S_bba&hzI}k!4TbVpF7vCg%c7IYH4Z~f3vf(v*S!mNFWFk z%}t&^n>+sA*6P1!6ZpwOBkc>|=^X)q6zF|eRxLF(D|>q`s9Grb`|U2Gxy>$lj#ASYF(HDjFCV_-bNP-_S5>YRU}oMk`m8lv^iHE-+BCJDDkVxhK_D zB}7JHz<$O`#OACKYqk7nct|I=OP-9JO67WSaq;BHh@3oy|Ky|Wy~YkSKi2NW+0NR- zC$q|k^DedvWR9={hJD4vgrR@!>vCYtz87BI0tE*}OebL8YkB!^0tcBd^`xu_U0N8@ zcYYoOE1r@<2Fi2PzRuIbLyu-Fl|@Pgf!TgbiQ><9(FbGBSoQAnGWHG*23e1ej*dpR z{KkI!)OK_fLf6ARuPr7JDNvm3258fHukQA})g-LTNu(28g~o#d>$pVkjM>!aQ7g+_ zoGe2D);?_Y)2CLR+VXRos*g`7@|bDz%##h38MGHRt}yA0io)4A40M}q$pp~>%Jv&~ zAtwSTL6t2yqn2-M%kTd>0p)0?qeBKI1WXn%_}_$(q~uFLvFS#407-7de}etB0~ip6 zJA^W6J6+9nx|8#wuy7c(s!`bNgbaX~7Lj^1nFxW&&OUBt8g=Z})9DMN+Pt&PpiYY7~G z{G?LYWK%$Jnp7Gw-wiYj{-mj)!Jfbo6B`Tqk_aH~=*SNcsms3ZHQ?3kEQV1q z^g?#oO)OI%KNP4J6KyQvp0CU=0rP_gHCp^}j6s z2Tj&pc-RX7`^C=P@QBbkrA0h0uC8y5${%TIk)$$9C?N9gKKwLNERn<~)B6jD}Gd zv0d`HgWa$!P-)-48*We5#UlJyGL5|^goh~*jrr+5&vW~a=K>QECWeMzFl+^cv)#I5 zB(V+3t`qtQd%>YFSS7Mkt{C->Op=~t|8T;xl%2r*gB6yT>y(l{_31(+c^UIDxROWg z6tCC`&d>i2g8+A`F)?(`N=y5kZ5fgi!R|3x`^db}jYV1imu>3Z?r-VbRP?W%WD4PW zUORK20F?b&^VxzAu7+Q&Lc=>4P~cPnf{V>~Tmdb)J=+SPt!!mS)4k%QpT-$taZlle zR?xqS2x(iq!=m1iUv{f2EAWRvX;#>#hb+Bs)YD&NWGKl~ym;AZJ^jl)D<99c|eH?gCw^ zs^YVd;Xf3h17U24TJ5;l>>x-wsJXlMg$f5*cyUl_-r{o;Yq$6LbuAs85|v_WFjycB zf@KQJUahRGyst*L_-QeNyihKpm=%IWhSKfN;-^;Drx^nLgvX%cH&X%?3i_j@qy&%}V=lmhh~#MT z?$F?bKlteKnp1t_Uiw!XkPIt%65i{3{x8zgyTEwB)>(LdrGZ0XXP(S>;;Xh#Uzc+d zVT4v6FE<{uuS08#t@e~*9Y9i3jd9d19qC8MHbwG>a~_`}(nfjP>eI+m}Wo{=%4 z(<+Q7ft^rUUyd?@9cd+G1uDLlPqBK!7Jf0Sq?ODki*&F_B09v2lz;oA__mUMR1uG5 z!fkPJf_xqPWR<@Sw^g+Dso{c(X`H^yjLEA^wsA#quU}u|N!Wi&4_cc-`6`_IPz^K* z=7Ml#mEum2)dP&AF;i0>`Lii(=fc!gD&>zXRq_90CExOsdiwO~dz9mgtgI4V>s!WE zhPZhENJei}@yS{3R8;VwhQM3E;?KH?wYIc?rL3#1HN3hW!{nw%9E|}V*rV%09OrM| zywNKkudS|5g-*V9?V8Ku$HhDepoZ_r%3N=%w(Ka7JzpdzOj;lPyEe>?D3A_F>$G|X zAdW_(%N*x_{(QH=z0+|iqw2K!qw)bLz|%o@6B83PD69t$`l0I~8VC=^VkE%>&9w`; z22=>>l%P$mzJOge4Z5+?zw!A}gr=*ItTfwzkrH8?domxarLFyzodBahK}{2e?R+|B z#g%_G>0Eq@VT|4fZ7J{1)h?T+&m!SOOT!+(GnL4fE$ z5r9AbfWro0T{p_B?L9qjLu*z&Y&A?cSyOKE#EY2-^3cLIZ9D6_y%M-m~ zl*i%5I7TD`V2tU?4$861St*T=IX3`G2Cd~kAqWE^4?3E3xPQ%gYYOwfZGctdGHq*x zp#?I9?ws8_p}Id^LWOlCA6@+*acEq1UnpYv^5=DteVO}Pf`Rj09=xSi3vRjQ$15tLVaq~ z_wP|dLpphqzC_yE+CsU5m>Y9;cBWuph=;pf1dsyFD(>}*03MSB9>IWHx2Ua+d8f(z zLrD6rZdea)_)hyCo}$4$g0QpWol?MoPOF8*uGpId*tRw{hKmkEc@pQH{bV4)gTIrrNGcVh)Y8AbF|x))Fq>NP-lr?s7#xFiW2V`go0ypRz8MVzgE~<7z}8F|Qdz8mOzPSra>wj=W|4l>L%&YJrA3=m`j z*_w|;skpQjGzC8aclx6bC;md|lt6(lM$^5>&DFG0O4|3A2D%1y1g}8g7{Ngp1}WTX z-LMRJl_s}YNef@}VH95||EDYIX(rw!oI`_yE7R^B+E#B$t)U%pkj9q5_bYofG&LDm zS#=;x{r4|0^8?%6zzn3C!8gH>J!0$y;FM-aG7b+}D|>l)dB0=7Zf`FD%GKA`=T!!N zTEg5T0+U!7S6gT!&bQn{`@#7`>;a+C2*_kdk=m-Nlv+Mv5G~aZMuk5=nsyk<_ySqq z!hPe1%2sdEG{F$@BvibA|9aM~bliCbbQ;7v;5ZH0A@8d?ijhA3m2O^ZM~L?ustC9oGH2vEb2xS`d zRrIMbO3JL#2zPMH&j7UPt5;#Lh)D?vHZCrFaI}Q)h9STfIKV?i=@ts9vJL)+Eg7)2 z2}MGXg`-d?kPS(3aaLd)O9x&myE?9CYk26#Cw!KB$Z|(mcoAalA3tJdX3Pm9!WI{; zf32*%h9tqLoCaiwqobo7n8WTQhDeZ4*Kgdwg*%1j?TI3!vT88HOFXn2#Oa14-rvO4sLGzgrZlFDS@wC-`R;ZD*p=LhnkroflR`4 zxf|mNJUu-zmb0=_8Kem$RWDz@e3qVmC0{2N(hSw6xapMBGvF_;<1RBYu8lk28M^%+5-N*;~|=;Fztd>YiLx^r^db>?1y*depd2kGG?F5Zl;VaCQg+8OwX? zmUZ1EI|265_AGJwH=M+;5m)fZFcM0qlnSCVM<=Ini)vMOcR?tu5flmw9PReDTSjJP zr&}ZFr9ZQ+bO}XB=Y}Pi&|qqG)~yHPm=UN^U^h?}nUX0VpCykPz`wxrF@qR`W{D+d zQ-QaHY(@jr{%43)%*@O%44VEeYN%5_W8%lsw-TLrn(zKX$?osJ zqry>nWG4hZ2J&HOb^s-2VS5tLQ$U==L_|=hpuQ3l6P@ZNA$Bj-Egbs!)5MpM8|sTS zH5LlM$;nAeSGSZWAt@zgbs$F=vL}${a0Vz-!Y~Mr4gNacyGPlR%v2gObI-s48e1I! zII;kd4n$QTZcWY2wZPOOpfnr+xj?f=cCy3qJ#lda;KEWEgkzxHaFBqWv@|prX$xgr z+b>}7^p}^ncTQTGg0en64b9up`;nc=6qeU8jLM-~lJ9Ep@@f_x7p{<%*?ZqIvrPD;t}lsTFq-#&Izpk#6+y zye_Pc5Pg&1mYEqJEeK{>TG~-aeW1cYN5NPM69DtjlSIv4T;jYq!9!Vq!eUcZLZaqV z{Y;@As?7op4-TyS{plmv0reix%!9FESEt0o$45<16RW3<%+FVECvR_UeH|Hj#%Np5 z$eeszS~_Wadt2};%<5obx3T)Ix|_ZMD)fFF8%qxoi4^Omr#WeDZSA18%}9f{m&Bm8qy(l{4^5G@th7Gzi zfg!i~=nXolxFIim6hp^P;wNNsTyk98!V8CY0L=jcgr%f%L82d=24TqehI$do@z=}$ z9vi;=7v zAU3!^sG+8YMaMw6ug7`la?n!mJB8i~Y_WN`Y)*S65fy9U*#>^{p*s z=mL0tNVI^$FtHb)2y|Wj$B&=a{$7L8N@ZnbTvAe0*CGbCB0AYY&;I-O@7aqNah;v= zy|qaY3;Fo@eYUT=#>IsP2NMtyhC|Z-`0=fx;$mxS|IDB!U?mSZcb&G!GXGQG zVI{RS>|ZzDH(qXZTZTIp$V2MM_M7P~E}`0fLuzG69WXWu0RtdT9M5?K0=E$JS%7BS z9x~?!Gfc~YEqepwkz}#CUf|OAHqC?f*M(}YK_UU-1U$SfI2;fs%g_XX^rqm$Z)j#= zOe^}|p_aP3KJJD7;w31c8$ujS9lM{2%haHGo?vV&^!hSr+xIZ+fKj%}mmVsW<;K2F z%R~1D)6tQM*rE?YGslw-&w^zR8a~F&H~WNUjJ;>2-3Q2e~08em9Y1iC;qg*kk94P#M` zcIL_JCP@%Hf`S+v7hxm?u=N0if*D&CqZWWNK!8L}Z>jhyUg6!?*j4ft{(-K06_g*$ zUFYk`Hb1FJXL+DuKJz^Ahdh^@{Ug*nl#r-!`nPZ2V7Ld>uBD-21AKZz-G-e)&$vBV zlZWqoYBt-J^R9(v%()es=#?s7y@c1q2%t<2Bb70Cf*u6=M>+7TFQtBhmpX zAWOJ;^Cm2@H7Gq8Vq+qD5PR6y=VKwvps3aQwzhoTfzWEHRb~f_AIelOtelA0^IZiA z03V1g1#nCW2?-Q5G|?Ly&U_Ya^dNv>7;OTf3@o5kjmZa(MFot%+uPfFA>qvh_U&1A zb}WoJioy6m&~GI6+A`#H1uz9{H0CrgY>OV^LZKHyn3x})oQH=;4z{F3D<`79UIgSW ziTCP&JPa#0Ha0$-B-}zI;>wm)e&wIPNnu%2ciWq8xK%v&_Y(0O9b+GZL5a{!!BpDB zXiQM}$zrEh3mAv-#wQj)z$){D)^majp)ahQ{41kSrN5Y((Q9v*g7Ek#B zLSf_?L&^jY3jT~SSq0LHx0>0b%X@H}pyAU2Zu$85-t?~&K~_X6HX|3uvFKw#LD!yF zs92WDs_bOOxa2CDxBWYO&^{6Z_|478{*`-TqL7y+jfyl*R~Fa+qmBT(K!=o%C%`CH zoSE#unAx?+b-(2vZS5v>+c~oO=V{(zqQg|-^=dK3W>0h=UR^ElV&T(miH3g6oc#?? z0th_kRu?rx;!)j`pK>h*YmSo8k$$t5mF XOpUP)>2o#sEEhsuSx2c#!7Ac^)=i)y literal 0 HcmV?d00001 From 1235c748283196e67e7f36f66a88e6b510fb9e2e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:28:21 +0100 Subject: [PATCH 13/54] Fix crashes in function registration + test Internal function won't need their refcount increased as they outlive the debugger session, and userland functions won't be unloaded either. So no refcount management is necessary for registered functions. --- NEWS | 3 +++ sapi/phpdbg/phpdbg.c | 7 +----- sapi/phpdbg/phpdbg_prompt.c | 1 - sapi/phpdbg/tests/register_function.phpt | 30 ++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 sapi/phpdbg/tests/register_function.phpt diff --git a/NEWS b/NEWS index d916d36807be1..c98589868e445 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ PHP NEWS - Intl: . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) +- PHPDBG: + . Fix crashes in function registration + test. (nielsdos, Girgias) + - SNMP: . Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session). (David Carlier) diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 9bedff03af202..5a4dd6acdbe2f 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -89,11 +89,6 @@ static void php_phpdbg_destroy_bp_condition(zval *data) /* {{{ */ efree(brake); } /* }}} */ -static void php_phpdbg_destroy_registered(zval *data) /* {{{ */ -{ - zend_function_dtor(data); -} /* }}} */ - static void php_phpdbg_destroy_file_source(zval *data) /* {{{ */ { phpdbg_file_source *source = (phpdbg_file_source *) Z_PTR_P(data); @@ -163,7 +158,7 @@ static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */ zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP], 8, NULL, NULL, 0); zend_hash_init(&PHPDBG_G(seek), 8, NULL, NULL, 0); - zend_hash_init(&PHPDBG_G(registered), 8, NULL, php_phpdbg_destroy_registered, 0); + zend_hash_init(&PHPDBG_G(registered), 8, NULL, NULL, true); zend_hash_init(&PHPDBG_G(file_sources), 0, NULL, php_phpdbg_destroy_file_source, 0); phpdbg_setup_watchpoints(); diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 76c64a9a8a631..5276d62ee295e 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -1424,7 +1424,6 @@ PHPDBG_COMMAND(register) /* {{{ */ if (!zend_hash_str_exists(&PHPDBG_G(registered), lcname, lcname_len)) { if ((function = zend_hash_str_find_ptr(EG(function_table), lcname, lcname_len))) { zend_hash_str_update_ptr(&PHPDBG_G(registered), lcname, lcname_len, function); - function_add_ref(function); phpdbg_notice("Registered %s", lcname); } else { diff --git a/sapi/phpdbg/tests/register_function.phpt b/sapi/phpdbg/tests/register_function.phpt new file mode 100644 index 0000000000000..bf4f1615d3235 --- /dev/null +++ b/sapi/phpdbg/tests/register_function.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test registering of functions +--PHPDBG-- +R testfunc +testfunc 1 2 3 +R var_dump +var_dump foo +q +--FILE-- + +--EXPECTF-- +[Successful compilation of %s] +prompt> [Registered testfunc] +prompt> array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) +} + +prompt> [Registered var_dump] +prompt> string(3) "foo" + +prompt> From 783ecad82ed398632148cc76dc5b6596abe2d5c3 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:14:46 +0100 Subject: [PATCH 14/54] Fix crashes in enchant when passing null bytes See https://github.com/php/php-src/pull/17393#discussion_r1907660137 Closes GH-17407. --- NEWS | 3 ++ ext/enchant/enchant.c | 22 +++++----- ext/enchant/tests/null_bytes.phpt | 70 +++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 11 deletions(-) create mode 100644 ext/enchant/tests/null_bytes.phpt diff --git a/NEWS b/NEWS index c98589868e445..7c243ae948783 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.17 +- Enchant: + . Fix crashes in enchant when passing null bytes. (nielsdos) + - FTP: . Fixed bug GH-16800 (ftp functions can abort with EINTR). (nielsdos) diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 5c209705d776b..d8c5a034d483e 100644 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -339,7 +339,7 @@ PHP_FUNCTION(enchant_broker_set_dict_path) char *value; size_t value_len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ols", &broker, enchant_broker_ce, &dict_type, &value, &value_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Olp", &broker, enchant_broker_ce, &dict_type, &value, &value_len) == FAILURE) { RETURN_THROWS(); } @@ -440,7 +440,7 @@ PHP_FUNCTION(enchant_broker_request_dict) char *tag; size_t taglen; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) { RETURN_THROWS(); } @@ -534,7 +534,7 @@ PHP_FUNCTION(enchant_broker_dict_exists) size_t taglen; enchant_broker * pbroker; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &broker, enchant_broker_ce, &tag, &taglen) == FAILURE) { RETURN_THROWS(); } @@ -559,7 +559,7 @@ PHP_FUNCTION(enchant_broker_set_ordering) size_t ptaglen; enchant_broker * pbroker; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oss", &broker, enchant_broker_ce, &ptag, &ptaglen, &pordering, &porderinglen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Opp", &broker, enchant_broker_ce, &ptag, &ptaglen, &pordering, &porderinglen) == FAILURE) { RETURN_THROWS(); } @@ -597,7 +597,7 @@ PHP_FUNCTION(enchant_dict_quick_check) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|z", &dict, enchant_dict_ce, &word, &wordlen, &sugg) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op|z", &dict, enchant_dict_ce, &word, &wordlen, &sugg) == FAILURE) { RETURN_THROWS(); } @@ -642,7 +642,7 @@ PHP_FUNCTION(enchant_dict_check) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -662,7 +662,7 @@ PHP_FUNCTION(enchant_dict_suggest) enchant_dict *pdict; size_t n_sugg; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -690,7 +690,7 @@ PHP_FUNCTION(enchant_dict_add) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -708,7 +708,7 @@ PHP_FUNCTION(enchant_dict_add_to_session) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -726,7 +726,7 @@ PHP_FUNCTION(enchant_dict_is_added) size_t wordlen; enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &dict, enchant_dict_ce, &word, &wordlen) == FAILURE) { RETURN_THROWS(); } @@ -748,7 +748,7 @@ PHP_FUNCTION(enchant_dict_store_replacement) enchant_dict *pdict; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oss", &dict, enchant_dict_ce, &mis, &mislen, &cor, &corlen) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Opp", &dict, enchant_dict_ce, &mis, &mislen, &cor, &corlen) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/enchant/tests/null_bytes.phpt b/ext/enchant/tests/null_bytes.phpt new file mode 100644 index 0000000000000..cdd26cf97d355 --- /dev/null +++ b/ext/enchant/tests/null_bytes.phpt @@ -0,0 +1,70 @@ +--TEST-- +null bytes +--EXTENSIONS-- +enchant +--SKIPIF-- + +--FILE-- +getMessage(), "\n"; + } +} + +foreach ($two_params_dict as $func) { + try { + $func($requestDict, "foo\0bar"); + } catch (ValueError $e) { + echo $e->getMessage(), "\n"; + } +} + +try { + var_dump(enchant_broker_set_ordering($broker, "foo\0bar", "foo\0bar")); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + +try { + var_dump(enchant_dict_store_replacement($requestDict, "foo\0bar", "foo\0bar")); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +enchant_broker_request_dict(): Argument #2 ($tag) must not contain any null bytes +enchant_broker_dict_exists(): Argument #2 ($tag) must not contain any null bytes +enchant_dict_quick_check(): Argument #2 ($word) must not contain any null bytes +enchant_dict_check(): Argument #2 ($word) must not contain any null bytes +enchant_dict_suggest(): Argument #2 ($word) must not contain any null bytes +enchant_dict_add(): Argument #2 ($word) must not contain any null bytes +enchant_dict_add_to_session(): Argument #2 ($word) must not contain any null bytes +enchant_dict_is_added(): Argument #2 ($word) must not contain any null bytes +enchant_broker_set_ordering(): Argument #2 ($tag) must not contain any null bytes +enchant_dict_store_replacement(): Argument #2 ($misspelled) must not contain any null bytes From e6e2ec56ab77356160135f35645d38bd97915ed4 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:40:39 +0100 Subject: [PATCH 15/54] Merge duplicate code blocks This makes the code less error-prone. --- Zend/zend_ini.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 9588574df6cfb..de37042047f17 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -696,19 +696,7 @@ static zend_ulong zend_ini_parse_quantity_internal(zend_string *value, zend_ini_ return 0; } digits += 2; - if (UNEXPECTED(digits == str_end)) { - /* Escape the string to avoid null bytes and to make non-printable chars - * visible */ - smart_str_append_escaped(&invalid, ZSTR_VAL(value), ZSTR_LEN(value)); - smart_str_0(&invalid); - - *errstr = zend_strpprintf(0, "Invalid quantity \"%s\": no digits after base prefix, interpreting as \"0\" for backwards compatibility", - ZSTR_VAL(invalid.s)); - - smart_str_free(&invalid); - return 0; - } - if (UNEXPECTED(digits != zend_ini_consume_quantity_prefix(digits, str_end))) { + if (UNEXPECTED(digits == str_end || digits != zend_ini_consume_quantity_prefix(digits, str_end))) { /* Escape the string to avoid null bytes and to make non-printable chars * visible */ smart_str_append_escaped(&invalid, ZSTR_VAL(value), ZSTR_LEN(value)); From 2c267722b361fc32568f0b6d183a74d0f0c5f7a5 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:49:26 +0100 Subject: [PATCH 16/54] Fix GH-16886: ini_parse_quantity() fails to emit warning for 0x+0 --- Zend/tests/zend_ini/gh16886.phpt | 41 ++++++++++++++++++++++++++++++++ Zend/zend_ini.c | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/zend_ini/gh16886.phpt diff --git a/Zend/tests/zend_ini/gh16886.phpt b/Zend/tests/zend_ini/gh16886.phpt new file mode 100644 index 0000000000000..2e85894572359 --- /dev/null +++ b/Zend/tests/zend_ini/gh16886.phpt @@ -0,0 +1,41 @@ +--TEST-- +GH-16886 (ini_parse_quantity() fails to emit warning for 0x+0) +--FILE-- + +--EXPECTF-- +Warning: Invalid quantity "0x 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0x+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0x-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0b 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0b+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0b-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0o 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0o+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 + +Warning: Invalid quantity "0o-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d +0 diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index de37042047f17..e521cf40d8ef5 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -598,7 +598,7 @@ static const char *zend_ini_consume_quantity_prefix(const char *const digits, co if (digits_consumed[0] == '0' && !isdigit(digits_consumed[1])) { /* Value is just 0 */ if ((digits_consumed+1) == str_end) { - return digits; + return digits_consumed; } switch (digits_consumed[1]) { From 7626e88de70fc0ed29873dd9d970b5688efc11f0 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 26 Dec 2024 14:16:35 +0100 Subject: [PATCH 17/54] Fix GH-16892: ini_parse_quantity() fails to parse inputs starting with 0x0b --- Zend/tests/zend_ini/gh16892.phpt | 22 ++++++++++++++++++++++ Zend/zend_ini.c | 11 ++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/zend_ini/gh16892.phpt diff --git a/Zend/tests/zend_ini/gh16892.phpt b/Zend/tests/zend_ini/gh16892.phpt new file mode 100644 index 0000000000000..05cfe02192e9d --- /dev/null +++ b/Zend/tests/zend_ini/gh16892.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-16892 (ini_parse_quantity() fails to parse inputs starting with 0x0b) +--FILE-- + +--EXPECT-- +11 +11 +-11 +-11 +48879 +48879 +-48879 +-48879 diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index e521cf40d8ef5..f5d178073066e 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -587,7 +587,7 @@ typedef enum { ZEND_INI_PARSE_QUANTITY_UNSIGNED, } zend_ini_parse_quantity_signed_result_t; -static const char *zend_ini_consume_quantity_prefix(const char *const digits, const char *const str_end) { +static const char *zend_ini_consume_quantity_prefix(const char *const digits, const char *const str_end, int base) { const char *digits_consumed = digits; /* Ignore leading whitespace. */ while (digits_consumed < str_end && zend_is_whitespace(*digits_consumed)) {++digits_consumed;} @@ -606,9 +606,14 @@ static const char *zend_ini_consume_quantity_prefix(const char *const digits, co case 'X': case 'o': case 'O': + digits_consumed += 2; + break; case 'b': case 'B': - digits_consumed += 2; + if (base != 16) { + /* 0b or 0B is valid in base 16, but not in the other supported bases. */ + digits_consumed += 2; + } break; } } @@ -696,7 +701,7 @@ static zend_ulong zend_ini_parse_quantity_internal(zend_string *value, zend_ini_ return 0; } digits += 2; - if (UNEXPECTED(digits == str_end || digits != zend_ini_consume_quantity_prefix(digits, str_end))) { + if (UNEXPECTED(digits == str_end || digits != zend_ini_consume_quantity_prefix(digits, str_end, base))) { /* Escape the string to avoid null bytes and to make non-printable chars * visible */ smart_str_append_escaped(&invalid, ZSTR_VAL(value), ZSTR_LEN(value)); From a2b820488015f37a03e139134538b10da12c3b5a Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 9 Jan 2025 19:52:11 +0100 Subject: [PATCH 18/54] Add comment Closes GH-17274. --- Zend/zend_ini.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index f5d178073066e..2ab476e25bdb8 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -701,6 +701,7 @@ static zend_ulong zend_ini_parse_quantity_internal(zend_string *value, zend_ini_ return 0; } digits += 2; + /* STRTOULL may silently ignore a prefix of whitespace, sign, and base prefix, which would be invalid at this position */ if (UNEXPECTED(digits == str_end || digits != zend_ini_consume_quantity_prefix(digits, str_end, base))) { /* Escape the string to avoid null bytes and to make non-printable chars * visible */ From bf4a776ee7a0f914ba0c87bc645ac77a01ce06fe Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 9 Jan 2025 19:53:23 +0100 Subject: [PATCH 19/54] NEWS --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 7c243ae948783..125c704b122c7 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,12 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.17 +- Core: + . Fixed bug GH-16892 (ini_parse_quantity() fails to parse inputs starting + with 0x0b). (nielsdos) + . Fixed bug GH-16886 (ini_parse_quantity() fails to emit warning for 0x+0). + (nielsdos) + - Enchant: . Fix crashes in enchant when passing null bytes. (nielsdos) From a2a7287b870cc21154905ff8a700cab2d7445a3f Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 9 Jan 2025 19:15:55 +0100 Subject: [PATCH 20/54] Fix GH-17409: Assertion failure Zend/zend_hash.c:1730 The array merging function may still hold the properties array while the object is already being destroyed. Therefore, we should take into account the refcount in simplexml's destruction code. It may be possible to trigger this in other ways too. Closes GH-17421. --- NEWS | 3 +++ ext/simplexml/simplexml.c | 4 ++-- ext/simplexml/tests/gh17409.phpt | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 ext/simplexml/tests/gh17409.phpt diff --git a/NEWS b/NEWS index 125c704b122c7..b1319961dc009 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,9 @@ PHP NEWS - PHPDBG: . Fix crashes in function registration + test. (nielsdos, Girgias) +- SimpleXML: + . Fixed bug GH-17409 (Assertion failure Zend/zend_hash.c:1730). (nielsdos) + - SNMP: . Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session). (David Carlier) diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 00551267a45e9..18bfa31271e19 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2189,8 +2189,8 @@ static void sxe_object_free_storage(zend_object *object) sxe_object_free_iterxpath(sxe); if (sxe->properties) { - zend_hash_destroy(sxe->properties); - FREE_HASHTABLE(sxe->properties); + ZEND_ASSERT(!(GC_FLAGS(sxe->properties) & IS_ARRAY_IMMUTABLE)); + zend_hash_release(sxe->properties); } } /* }}} */ diff --git a/ext/simplexml/tests/gh17409.phpt b/ext/simplexml/tests/gh17409.phpt new file mode 100644 index 0000000000000..f91ef38ba70ec --- /dev/null +++ b/ext/simplexml/tests/gh17409.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-17409 (Assertion failure Zend/zend_hash.c) +--EXTENSIONS-- +simplexml +--CREDITS-- +YuanchengJiang +--FILE-- + + + + +'); +// Need to use $GLOBALS such that simplexml object is destroyed +var_dump(array_merge_recursive($GLOBALS, $GLOBALS)["root"]); +?> +--EXPECT-- +array(1) { + ["child"]=> + array(0) { + } +} From e8fce295bc8c3a4d07a67be55795756c2a69c507 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:14:13 +0100 Subject: [PATCH 21/54] Backport fix GH-17307 This is a backport of GH-17319 to fix GH-17307 on lower branches. Closes GH-17424. --- NEWS | 3 +++ ext/opcache/jit/zend_jit_arm64.dasc | 15 ++++++-------- ext/opcache/jit/zend_jit_x86.dasc | 11 ++++------ ext/opcache/tests/jit/gh17307.phpt | 32 +++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 16 deletions(-) create mode 100644 ext/opcache/tests/jit/gh17307.phpt diff --git a/NEWS b/NEWS index b1319961dc009..80fbc84667804 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,9 @@ PHP NEWS - Intl: . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) +- Opcache: + . Fixed bug GH-17307 (Internal closure causes JIT failure). (nielsdos) + - PHPDBG: . Fix crashes in function registration + test. (nielsdos, Girgias) diff --git a/ext/opcache/jit/zend_jit_arm64.dasc b/ext/opcache/jit/zend_jit_arm64.dasc index c351c482d51cb..2cbf68643086a 100644 --- a/ext/opcache/jit/zend_jit_arm64.dasc +++ b/ext/opcache/jit/zend_jit_arm64.dasc @@ -8471,6 +8471,7 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con { uint32_t used_stack; bool stack_check = 1; + const size_t func_type_offset = is_closure ? offsetof(zend_closure, func.type) : offsetof(zend_function, type); // REG0 -> zend_function // FCARG1 -> used_stack @@ -8484,15 +8485,11 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con used_stack = (ZEND_CALL_FRAME_SLOT + opline->extended_value + ZEND_OBSERVER_ENABLED) * sizeof(zval); | // if (EXPECTED(ZEND_USER_CODE(func->type))) { - if (!is_closure) { - | LOAD_32BIT_VAL FCARG1w, used_stack - | // Check whether REG0 is an internal function. - | ldrb TMP1w, [REG0, #offsetof(zend_function, type)] - | TST_32_WITH_CONST TMP1w, 1, TMP2w - | bne >1 - } else { - | LOAD_32BIT_VAL FCARG1w, used_stack - } + | LOAD_32BIT_VAL FCARG1w, used_stack + | // Check whether REG0 is an internal function. + | ldrb TMP1w, [REG0, #func_type_offset] + | TST_32_WITH_CONST TMP1w, 1, TMP2w + | bne >1 | // used_stack += (func->op_array.last_var + func->op_array.T - MIN(func->op_array.num_args, num_args)) * sizeof(zval); | LOAD_32BIT_VAL REG2w, opline->extended_value if (!is_closure) { diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index f1c52bcc976e3..9cf0c6cd8e881 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -9072,6 +9072,7 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con { uint32_t used_stack; bool stack_check = 1; + const size_t func_type_offset = is_closure ? offsetof(zend_closure, func.type) : offsetof(zend_function, type); if (func) { used_stack = zend_vm_calc_used_stack(opline->extended_value, func); @@ -9082,13 +9083,9 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con used_stack = (ZEND_CALL_FRAME_SLOT + opline->extended_value + ZEND_OBSERVER_ENABLED) * sizeof(zval); | // if (EXPECTED(ZEND_USER_CODE(func->type))) { - if (!is_closure) { - | test byte [r0 + offsetof(zend_function, type)], 1 - | mov FCARG1a, used_stack - | jnz >1 - } else { - | mov FCARG1a, used_stack - } + | test byte [r0 + func_type_offset], 1 + | mov FCARG1a, used_stack + | jnz >1 | // used_stack += (func->op_array.last_var + func->op_array.T - MIN(func->op_array.num_args, num_args)) * sizeof(zval); | mov edx, opline->extended_value if (!is_closure) { diff --git a/ext/opcache/tests/jit/gh17307.phpt b/ext/opcache/tests/jit/gh17307.phpt new file mode 100644 index 0000000000000..292d695963c2e --- /dev/null +++ b/ext/opcache/tests/jit/gh17307.phpt @@ -0,0 +1,32 @@ +--TEST-- +GH-17307 (Internal closure causes JIT failure) +--EXTENSIONS-- +opcache +simplexml +bcmath +--INI-- +opcache.jit=1254 +opcache.jit_hot_func=1 +opcache.jit_buffer_size=32M +--FILE-- +"); + +function run_loop($firstTerms, $closure) { + foreach ($firstTerms as $firstTerm) { + \debug_zval_dump($firstTerm); + $closure($firstTerm, "10"); + } +} + +run_loop($simple, bcadd(...)); +echo "Done\n"; + +?> +--EXPECTF-- +object(SimpleXMLElement)#%d (0) refcount(3){ +} +object(SimpleXMLElement)#%d (0) refcount(3){ +} +Done From d08a9e00105ebfa7f9a41df899c8131f251745e9 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:35:16 +0100 Subject: [PATCH 22/54] Fix GH-17139: Fix zip_entry_name() crash on invalid entry Don't increment the refcount, but latter remember the ID to check afterwards whether the resource still exists. Replaces GH-17142. Closes GH-17439. --- NEWS | 4 ++++ ext/zip/php_zip.c | 3 ++- ext/zip/php_zip.h | 3 +++ ext/zip/tests/gh17319.phpt | 19 +++++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ext/zip/tests/gh17319.phpt diff --git a/NEWS b/NEWS index 80fbc84667804..f001f53116856 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,10 @@ PHP NEWS . Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session). (David Carlier) +- Zip: + . Fixed bug GH-17139 (Fix zip_entry_name() crash on invalid entry). + (nielsdos) + 02 Jan 2025, PHP 8.3.16RC1 - Core: diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 0c1dfaf5dd131..54bdffbecb03b 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1255,6 +1255,7 @@ PHP_FUNCTION(zip_read) RETURN_FALSE; } + zr_rsrc->zip_rsrc_handle = Z_RES_P(zip_dp)->handle; zr_rsrc->zf = zip_fopen_index(rsrc_int->za, rsrc_int->index_current, 0); if (zr_rsrc->zf) { rsrc_int->index_current++; @@ -1371,7 +1372,7 @@ static void php_zip_entry_get_info(INTERNAL_FUNCTION_PARAMETERS, int opt) /* {{{ RETURN_THROWS(); } - if (!zr_rsrc->zf) { + if (!zr_rsrc->zf || !zend_hash_index_exists(&EG(regular_list), zr_rsrc->zip_rsrc_handle)) { RETURN_FALSE; } diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index 41392d1967d74..fea943cbbffce 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -60,6 +60,9 @@ typedef zip_rsrc * zip_rsrc_ptr; typedef struct _ze_zip_read_rsrc { struct zip_file *zf; struct zip_stat sb; + /* Used to check if the zip resource still exists, + * without holding a reference. This works because the IDs are unique. */ + zend_long zip_rsrc_handle; } zip_read_rsrc; /* Extends zend object */ diff --git a/ext/zip/tests/gh17319.phpt b/ext/zip/tests/gh17319.phpt new file mode 100644 index 0000000000000..04df39d839e7f --- /dev/null +++ b/ext/zip/tests/gh17319.phpt @@ -0,0 +1,19 @@ +--TEST-- +GH-17139 - zip_entry_name() crash +--EXTENSIONS-- +zip +--FILE-- + +--EXPECTF-- +Deprecated: Function zip_open() is deprecated in %s on line %d + +Deprecated: Function zip_read() is deprecated in %s on line %d + +Deprecated: Function zip_entry_name() is deprecated in %s on line %d +bool(false) From a6a290d541ae2de2e9248acd48ffa6129b6577b3 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 6 Jan 2025 15:18:00 +0100 Subject: [PATCH 23/54] Relax final+private warning for trait methods with inherited final Fixes GH-17214 Closes GH-17381 --- NEWS | 2 ++ Zend/tests/gh17214.phpt | 26 ++++++++++++++++++++++++++ Zend/tests/traits/gh12854.phpt | 2 -- Zend/zend_inheritance.c | 8 +++++--- 4 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 Zend/tests/gh17214.phpt diff --git a/NEWS b/NEWS index f001f53116856..d247f33bc3540 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP NEWS with 0x0b). (nielsdos) . Fixed bug GH-16886 (ini_parse_quantity() fails to emit warning for 0x+0). (nielsdos) + . Fixed bug GH-17214 (Relax final+private warning for trait methods with + inherited final). (ilutov) - Enchant: . Fix crashes in enchant when passing null bytes. (nielsdos) diff --git a/Zend/tests/gh17214.phpt b/Zend/tests/gh17214.phpt new file mode 100644 index 0000000000000..ec63c0e9855ea --- /dev/null +++ b/Zend/tests/gh17214.phpt @@ -0,0 +1,26 @@ +--TEST-- +GH-17214: Relax final+private warning for trait methods with inherited final +--FILE-- +anotherMethod(); + } +} + +?> +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/tests/traits/gh12854.phpt b/Zend/tests/traits/gh12854.phpt index 471b4c6b56558..627f78ccae29f 100644 --- a/Zend/tests/traits/gh12854.phpt +++ b/Zend/tests/traits/gh12854.phpt @@ -39,8 +39,6 @@ foreach (['pub', 'prot', 'priv', 'final1', 'final2', 'final3'] as $method) { ?> --EXPECTF-- -Warning: Private methods cannot be final as they are never overridden by other classes in %s on line %d - Warning: Private methods cannot be final as they are never overridden by other classes in %s on line %d --- Method: pub --- bool(true) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 6ff886adcfc44..5ba883addca55 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -2048,9 +2048,11 @@ static void zend_fixup_trait_method(zend_function *fn, zend_class_entry *ce) /* static void zend_traits_check_private_final_inheritance(uint32_t original_fn_flags, zend_function *fn_copy, zend_string *name) { - /* If the function was originally already private+final, then it will have already been warned about. - * If the function became private+final only after applying modifiers, we need to emit the same warning. */ - if ((original_fn_flags & (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) != (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL) + /* If the function was originally already private+final, then it will have + * already been warned about. Only emit this error when the used trait method + * explicitly became final, avoiding errors for `as private` where it was + * already final. */ + if (!(original_fn_flags & ZEND_ACC_FINAL) && (fn_copy->common.fn_flags & (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)) == (ZEND_ACC_PRIVATE | ZEND_ACC_FINAL) && !zend_string_equals_literal_ci(name, ZEND_CONSTRUCTOR_FUNC_NAME)) { zend_error(E_COMPILE_WARNING, "Private methods cannot be final as they are never overridden by other classes"); From e4473abefc4fd711a2343a0954d60a2422a9e4fb Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 13 Jan 2025 18:09:08 +0000 Subject: [PATCH 24/54] Fix GH-17463: SplTempFileObject::ftruncate() segfault on negative length. close GH-465 --- NEWS | 4 ++++ ext/spl/spl_directory.c | 6 ++++++ ext/spl/tests/gh17463.phpt | 16 ++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 ext/spl/tests/gh17463.phpt diff --git a/NEWS b/NEWS index d247f33bc3540..004db0830827d 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,10 @@ PHP NEWS . Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session). (David Carlier) +- SPL: + . Fixed bug GH-17463 (crash on SplTempFileObject::ftruncate with negative + value). (David Carlier) + - Zip: . Fixed bug GH-17139 (Fix zip_entry_name() crash on invalid entry). (nielsdos) diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index e4e79b0edb861..0a4d1456d65e9 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -2708,6 +2708,12 @@ PHP_METHOD(SplFileObject, ftruncate) CHECK_SPL_FILE_OBJECT_IS_INITIALIZED(intern); + if (size < 0) { + zend_argument_value_error(1, "must be greater than or equal to 0"); + RETURN_THROWS(); + } + + if (!php_stream_truncate_supported(intern->u.file.stream)) { zend_throw_exception_ex(spl_ce_LogicException, 0, "Can't truncate file %s", ZSTR_VAL(intern->file_name)); RETURN_THROWS(); diff --git a/ext/spl/tests/gh17463.phpt b/ext/spl/tests/gh17463.phpt new file mode 100644 index 0000000000000..41939c62f5b2c --- /dev/null +++ b/ext/spl/tests/gh17463.phpt @@ -0,0 +1,16 @@ +--TEST-- +GH-17463 segfault on SplFileObject::ftruncate() with negative value. +--CREDITS-- +YuanchengJiang +--FILE-- +ftruncate(-1); +} catch (\ValueError $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +SplFileObject::ftruncate(): Argument #1 ($size) must be greater than or equal to 0 From 022a5fca91de92b45a43f0b484360fe5956ce148 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 14 Jan 2025 23:34:27 +0100 Subject: [PATCH 25/54] Fix NULL arithmetic during system program execution For the first child process execution, `TWG(process)` is `NULL`; we need to catch that to avoid undefined behavior. Closes GH-17470. --- NEWS | 2 ++ TSRM/tsrm_win32.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 004db0830827d..b67570a309af9 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ PHP NEWS (nielsdos) . Fixed bug GH-17214 (Relax final+private warning for trait methods with inherited final). (ilutov) + . Fixed NULL arithmetic during system program execution on Windows. (cmb, + nielsdos) - Enchant: . Fix crashes in enchant when passing null bytes. (nielsdos) diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 5d48ea2678a6c..da0ca7f005f58 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -374,14 +374,16 @@ static process_pair *process_get(FILE *stream) process_pair *ptr; process_pair *newptr; - for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) { - if (ptr->stream == stream) { - break; + if (TWG(process) != NULL) { + for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) { + if (ptr->stream == stream) { + break; + } } - } - if (ptr < (TWG(process) + TWG(process_size))) { - return ptr; + if (ptr < (TWG(process) + TWG(process_size))) { + return ptr; + } } newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair)); From ed8b11188b0304b76cc832b90089bf22006bc5e3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 15 Jan 2025 14:59:56 +0100 Subject: [PATCH 26/54] Fix potential OOB when checking for trailing spaces If `path_len` is zero, we must not access `path`, let alone try to subtract `-1` from it. Since `path` and `path_len` are supposed to come from a `zend_string`, this is not a security issue. Closes GH-17471. --- NEWS | 1 + win32/winutil.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b67570a309af9..5de1b803299d1 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ PHP NEWS inherited final). (ilutov) . Fixed NULL arithmetic during system program execution on Windows. (cmb, nielsdos) + . Fixed potential OOB when checking for trailing spaces on Windows. (cmb) - Enchant: . Fix crashes in enchant when passing null bytes. (nielsdos) diff --git a/win32/winutil.c b/win32/winutil.c index e09944d131b9b..35cc0fc4e2e23 100644 --- a/win32/winutil.c +++ b/win32/winutil.c @@ -56,7 +56,7 @@ PHP_WINUTIL_API void php_win32_error_msg_free(char *msg) int php_win32_check_trailing_space(const char * path, const size_t path_len) {/*{{{*/ - if (path_len > MAXPATHLEN - 1) { + if (path_len == 0 || path_len > MAXPATHLEN - 1) { return 1; } if (path) { From 7da1ea4029a39f970d61ff42f3d45eb91eed00de Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 17 Jan 2025 11:53:10 +0000 Subject: [PATCH 27/54] Updated to version 2025.1 (2025a) --- ext/date/lib/timezonedb.h | 2360 ++++++++++++++++++------------------- 1 file changed, 1178 insertions(+), 1182 deletions(-) diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 43d980a8a2dc7..3c75462009afb 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -79,533 +79,533 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "America/Argentina/Ushuaia" , 0x006F0B }, { (char*) "America/Aruba" , 0x0071F0 }, { (char*) "America/Asuncion" , 0x007293 }, - { (char*) "America/Atikokan" , 0x007613 }, - { (char*) "America/Atka" , 0x007720 }, - { (char*) "America/Bahia" , 0x007AF5 }, - { (char*) "America/Bahia_Banderas" , 0x007DB0 }, - { (char*) "America/Barbados" , 0x008089 }, - { (char*) "America/Belem" , 0x0081AB }, - { (char*) "America/Belize" , 0x008353 }, - { (char*) "America/Blanc-Sablon" , 0x008774 }, - { (char*) "America/Boa_Vista" , 0x008869 }, - { (char*) "America/Bogota" , 0x008A2A }, - { (char*) "America/Boise" , 0x008AE9 }, - { (char*) "America/Buenos_Aires" , 0x008EFC }, - { (char*) "America/Cambridge_Bay" , 0x0091CC }, - { (char*) "America/Campo_Grande" , 0x00955F }, - { (char*) "America/Cancun" , 0x009935 }, - { (char*) "America/Caracas" , 0x009B67 }, - { (char*) "America/Catamarca" , 0x009C31 }, - { (char*) "America/Cayenne" , 0x009F01 }, - { (char*) "America/Cayman" , 0x009FA4 }, - { (char*) "America/Chicago" , 0x00A045 }, - { (char*) "America/Chihuahua" , 0x00A73F }, - { (char*) "America/Ciudad_Juarez" , 0x00AA14 }, - { (char*) "America/Coral_Harbour" , 0x00AD0A }, - { (char*) "America/Cordoba" , 0x00ADAB }, - { (char*) "America/Costa_Rica" , 0x00B07B }, - { (char*) "America/Creston" , 0x00B16F }, - { (char*) "America/Cuiaba" , 0x00B22B }, - { (char*) "America/Curacao" , 0x00B5E8 }, - { (char*) "America/Danmarkshavn" , 0x00B68B }, - { (char*) "America/Dawson" , 0x00B870 }, - { (char*) "America/Dawson_Creek" , 0x00BC93 }, - { (char*) "America/Denver" , 0x00BF6A }, - { (char*) "America/Detroit" , 0x00C39D }, - { (char*) "America/Dominica" , 0x00C745 }, - { (char*) "America/Edmonton" , 0x00C7D3 }, - { (char*) "America/Eirunepe" , 0x00CBCB }, - { (char*) "America/El_Salvador" , 0x00CD9A }, - { (char*) "America/Ensenada" , 0x00CE56 }, - { (char*) "America/Fort_Nelson" , 0x00D299 }, - { (char*) "America/Fort_Wayne" , 0x00D861 }, - { (char*) "America/Fortaleza" , 0x00DA80 }, - { (char*) "America/Glace_Bay" , 0x00DC96 }, - { (char*) "America/Godthab" , 0x00E02D }, - { (char*) "America/Goose_Bay" , 0x00E3FE }, - { (char*) "America/Grand_Turk" , 0x00EA56 }, - { (char*) "America/Grenada" , 0x00EDB7 }, - { (char*) "America/Guadeloupe" , 0x00EE45 }, - { (char*) "America/Guatemala" , 0x00EED3 }, - { (char*) "America/Guayaquil" , 0x00EFB3 }, - { (char*) "America/Guyana" , 0x00F084 }, - { (char*) "America/Halifax" , 0x00F145 }, - { (char*) "America/Havana" , 0x00F7F7 }, - { (char*) "America/Hermosillo" , 0x00FC60 }, - { (char*) "America/Indiana/Indianapolis" , 0x00FD74 }, - { (char*) "America/Indiana/Knox" , 0x00FFAC }, - { (char*) "America/Indiana/Marengo" , 0x0103C5 }, - { (char*) "America/Indiana/Petersburg" , 0x01061F }, - { (char*) "America/Indiana/Tell_City" , 0x0108E9 }, - { (char*) "America/Indiana/Vevay" , 0x010B13 }, - { (char*) "America/Indiana/Vincennes" , 0x010CAA }, - { (char*) "America/Indiana/Winamac" , 0x010F00 }, - { (char*) "America/Indianapolis" , 0x01117D }, - { (char*) "America/Inuvik" , 0x01139C }, - { (char*) "America/Iqaluit" , 0x0116ED }, - { (char*) "America/Jamaica" , 0x011A69 }, - { (char*) "America/Jujuy" , 0x011BC8 }, - { (char*) "America/Juneau" , 0x011E86 }, - { (char*) "America/Kentucky/Louisville" , 0x01226C }, - { (char*) "America/Kentucky/Monticello" , 0x012770 }, - { (char*) "America/Knox_IN" , 0x012B5C }, - { (char*) "America/Kralendijk" , 0x012F60 }, - { (char*) "America/La_Paz" , 0x01301D }, - { (char*) "America/Lima" , 0x0130D3 }, - { (char*) "America/Los_Angeles" , 0x0131FA }, - { (char*) "America/Louisville" , 0x01371B }, - { (char*) "America/Lower_Princes" , 0x013C01 }, - { (char*) "America/Maceio" , 0x013CBE }, - { (char*) "America/Managua" , 0x013ED0 }, - { (char*) "America/Manaus" , 0x014003 }, - { (char*) "America/Marigot" , 0x0141BA }, - { (char*) "America/Martinique" , 0x014277 }, - { (char*) "America/Matamoros" , 0x014335 }, - { (char*) "America/Mazatlan" , 0x014522 }, - { (char*) "America/Mendoza" , 0x014812 }, - { (char*) "America/Menominee" , 0x014AE2 }, - { (char*) "America/Merida" , 0x014EA2 }, - { (char*) "America/Metlakatla" , 0x01514D }, - { (char*) "America/Mexico_City" , 0x0153BA }, - { (char*) "America/Miquelon" , 0x0156D9 }, - { (char*) "America/Moncton" , 0x01590B }, - { (char*) "America/Monterrey" , 0x015F04 }, - { (char*) "America/Montevideo" , 0x01620B }, - { (char*) "America/Montreal" , 0x0165E0 }, - { (char*) "America/Montserrat" , 0x016CA1 }, - { (char*) "America/Nassau" , 0x016D2F }, - { (char*) "America/New_York" , 0x017129 }, - { (char*) "America/Nipigon" , 0x017819 }, - { (char*) "America/Nome" , 0x017EDA }, - { (char*) "America/Noronha" , 0x0182C2 }, - { (char*) "America/North_Dakota/Beulah" , 0x0184C2 }, - { (char*) "America/North_Dakota/Center" , 0x0188F6 }, - { (char*) "America/North_Dakota/New_Salem" , 0x018CF5 }, - { (char*) "America/Nuuk" , 0x0190FA }, - { (char*) "America/Ojinaga" , 0x0194DC }, - { (char*) "America/Panama" , 0x0197D2 }, - { (char*) "America/Pangnirtung" , 0x019873 }, - { (char*) "America/Paramaribo" , 0x019BD6 }, - { (char*) "America/Phoenix" , 0x019C9D }, - { (char*) "America/Port-au-Prince" , 0x019DB1 }, - { (char*) "America/Port_of_Spain" , 0x019FF2 }, - { (char*) "America/Porto_Acre" , 0x01A080 }, - { (char*) "America/Porto_Velho" , 0x01A22E }, - { (char*) "America/Puerto_Rico" , 0x01A3CC }, - { (char*) "America/Punta_Arenas" , 0x01A489 }, - { (char*) "America/Rainy_River" , 0x01A96B }, - { (char*) "America/Rankin_Inlet" , 0x01AE85 }, - { (char*) "America/Recife" , 0x01B1CE }, - { (char*) "America/Regina" , 0x01B3C8 }, - { (char*) "America/Resolute" , 0x01B667 }, - { (char*) "America/Rio_Branco" , 0x01B9B1 }, - { (char*) "America/Rosario" , 0x01BB63 }, - { (char*) "America/Santa_Isabel" , 0x01BE33 }, - { (char*) "America/Santarem" , 0x01C276 }, - { (char*) "America/Santiago" , 0x01C426 }, - { (char*) "America/Santo_Domingo" , 0x01C989 }, - { (char*) "America/Sao_Paulo" , 0x01CAD2 }, - { (char*) "America/Scoresbysund" , 0x01CECC }, - { (char*) "America/Shiprock" , 0x01D2CD }, - { (char*) "America/Sitka" , 0x01D6EB }, - { (char*) "America/St_Barthelemy" , 0x01DAC6 }, - { (char*) "America/St_Johns" , 0x01DB83 }, - { (char*) "America/St_Kitts" , 0x01E300 }, - { (char*) "America/St_Lucia" , 0x01E38E }, - { (char*) "America/St_Thomas" , 0x01E42F }, - { (char*) "America/St_Vincent" , 0x01E4BD }, - { (char*) "America/Swift_Current" , 0x01E55E }, - { (char*) "America/Tegucigalpa" , 0x01E6EC }, - { (char*) "America/Thule" , 0x01E7BA }, - { (char*) "America/Thunder_Bay" , 0x01E99B }, - { (char*) "America/Tijuana" , 0x01F05C }, - { (char*) "America/Toronto" , 0x01F4AE }, - { (char*) "America/Tortola" , 0x01FB8D }, - { (char*) "America/Vancouver" , 0x01FC1B }, - { (char*) "America/Virgin" , 0x020172 }, - { (char*) "America/Whitehorse" , 0x02022F }, - { (char*) "America/Winnipeg" , 0x020652 }, - { (char*) "America/Yakutat" , 0x020B89 }, - { (char*) "America/Yellowknife" , 0x020F57 }, - { (char*) "Antarctica/Casey" , 0x02132D }, - { (char*) "Antarctica/Davis" , 0x02145D }, - { (char*) "Antarctica/DumontDUrville" , 0x021533 }, - { (char*) "Antarctica/Macquarie" , 0x0215E7 }, - { (char*) "Antarctica/Mawson" , 0x0219D3 }, - { (char*) "Antarctica/McMurdo" , 0x021A7D }, - { (char*) "Antarctica/Palmer" , 0x021DAF }, - { (char*) "Antarctica/Rothera" , 0x022138 }, - { (char*) "Antarctica/South_Pole" , 0x0221CF }, - { (char*) "Antarctica/Syowa" , 0x0225EE }, - { (char*) "Antarctica/Troll" , 0x022684 }, - { (char*) "Antarctica/Vostok" , 0x022733 }, - { (char*) "Arctic/Longyearbyen" , 0x0227EF }, - { (char*) "Asia/Aden" , 0x022ABC }, - { (char*) "Asia/Almaty" , 0x022B4D }, - { (char*) "Asia/Amman" , 0x022DD5 }, - { (char*) "Asia/Anadyr" , 0x023181 }, - { (char*) "Asia/Aqtau" , 0x023487 }, - { (char*) "Asia/Aqtobe" , 0x023706 }, - { (char*) "Asia/Ashgabat" , 0x023986 }, - { (char*) "Asia/Ashkhabad" , 0x023B09 }, - { (char*) "Asia/Atyrau" , 0x023C8C }, - { (char*) "Asia/Baghdad" , 0x023F15 }, - { (char*) "Asia/Bahrain" , 0x024197 }, - { (char*) "Asia/Baku" , 0x024250 }, - { (char*) "Asia/Bangkok" , 0x024544 }, - { (char*) "Asia/Barnaul" , 0x0245E8 }, - { (char*) "Asia/Beirut" , 0x0248F3 }, - { (char*) "Asia/Bishkek" , 0x024BDB }, - { (char*) "Asia/Brunei" , 0x024E51 }, - { (char*) "Asia/Calcutta" , 0x024EF7 }, - { (char*) "Asia/Chita" , 0x024FDF }, - { (char*) "Asia/Choibalsan" , 0x0252ED }, - { (char*) "Asia/Chongqing" , 0x02554B }, - { (char*) "Asia/Chungking" , 0x0256E0 }, - { (char*) "Asia/Colombo" , 0x025875 }, - { (char*) "Asia/Dacca" , 0x025978 }, - { (char*) "Asia/Damascus" , 0x025A6B }, - { (char*) "Asia/Dhaka" , 0x025F49 }, - { (char*) "Asia/Dili" , 0x02603C }, - { (char*) "Asia/Dubai" , 0x0260F2 }, - { (char*) "Asia/Dushanbe" , 0x026183 }, - { (char*) "Asia/Famagusta" , 0x0262FD }, - { (char*) "Asia/Gaza" , 0x0266C4 }, - { (char*) "Asia/Harbin" , 0x027260 }, - { (char*) "Asia/Hebron" , 0x0273F5 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x027FA2 }, - { (char*) "Asia/Hong_Kong" , 0x02809A }, - { (char*) "Asia/Hovd" , 0x0283AD }, - { (char*) "Asia/Irkutsk" , 0x028621 }, - { (char*) "Asia/Istanbul" , 0x02893F }, - { (char*) "Asia/Jakarta" , 0x028DFB }, - { (char*) "Asia/Jayapura" , 0x028F0C }, - { (char*) "Asia/Jerusalem" , 0x028FF9 }, - { (char*) "Asia/Kabul" , 0x029437 }, - { (char*) "Asia/Kamchatka" , 0x0294E2 }, - { (char*) "Asia/Karachi" , 0x0297D7 }, - { (char*) "Asia/Kashgar" , 0x0298ED }, - { (char*) "Asia/Kathmandu" , 0x02997E }, - { (char*) "Asia/Katmandu" , 0x029A2B }, - { (char*) "Asia/Khandyga" , 0x029AD8 }, - { (char*) "Asia/Kolkata" , 0x029E09 }, - { (char*) "Asia/Krasnoyarsk" , 0x029EF1 }, - { (char*) "Asia/Kuala_Lumpur" , 0x02A1FB }, - { (char*) "Asia/Kuching" , 0x02A31B }, - { (char*) "Asia/Kuwait" , 0x02A475 }, - { (char*) "Asia/Macao" , 0x02A506 }, - { (char*) "Asia/Macau" , 0x02A829 }, - { (char*) "Asia/Magadan" , 0x02AB4C }, - { (char*) "Asia/Makassar" , 0x02AE57 }, - { (char*) "Asia/Manila" , 0x02AF6A }, - { (char*) "Asia/Muscat" , 0x02B064 }, - { (char*) "Asia/Nicosia" , 0x02B0F5 }, - { (char*) "Asia/Novokuznetsk" , 0x02B364 }, - { (char*) "Asia/Novosibirsk" , 0x02B657 }, - { (char*) "Asia/Omsk" , 0x02B968 }, - { (char*) "Asia/Oral" , 0x02BC66 }, - { (char*) "Asia/Phnom_Penh" , 0x02BEF2 }, - { (char*) "Asia/Pontianak" , 0x02BFC6 }, - { (char*) "Asia/Pyongyang" , 0x02C0DF }, - { (char*) "Asia/Qatar" , 0x02C1A2 }, - { (char*) "Asia/Qostanay" , 0x02C246 }, - { (char*) "Asia/Qyzylorda" , 0x02C4DC }, - { (char*) "Asia/Rangoon" , 0x02C775 }, - { (char*) "Asia/Riyadh" , 0x02C83C }, - { (char*) "Asia/Saigon" , 0x02C8CD }, - { (char*) "Asia/Sakhalin" , 0x02C9C5 }, - { (char*) "Asia/Samarkand" , 0x02CCDC }, - { (char*) "Asia/Seoul" , 0x02CE67 }, - { (char*) "Asia/Shanghai" , 0x02D012 }, - { (char*) "Asia/Singapore" , 0x02D1B3 }, - { (char*) "Asia/Srednekolymsk" , 0x02D2BF }, - { (char*) "Asia/Taipei" , 0x02D5CF }, - { (char*) "Asia/Tashkent" , 0x02D7DA }, - { (char*) "Asia/Tbilisi" , 0x02D965 }, - { (char*) "Asia/Tehran" , 0x02DBE6 }, - { (char*) "Asia/Tel_Aviv" , 0x02DF1E }, - { (char*) "Asia/Thimbu" , 0x02E35C }, - { (char*) "Asia/Thimphu" , 0x02E402 }, - { (char*) "Asia/Tokyo" , 0x02E4A8 }, - { (char*) "Asia/Tomsk" , 0x02E589 }, - { (char*) "Asia/Ujung_Pandang" , 0x02E894 }, - { (char*) "Asia/Ulaanbaatar" , 0x02E95E }, - { (char*) "Asia/Ulan_Bator" , 0x02EBCC }, - { (char*) "Asia/Urumqi" , 0x02EE2A }, - { (char*) "Asia/Ust-Nera" , 0x02EEC8 }, - { (char*) "Asia/Vientiane" , 0x02F1EB }, - { (char*) "Asia/Vladivostok" , 0x02F2D1 }, - { (char*) "Asia/Yakutsk" , 0x02F5D6 }, - { (char*) "Asia/Yangon" , 0x02F8DA }, - { (char*) "Asia/Yekaterinburg" , 0x02F9A1 }, - { (char*) "Asia/Yerevan" , 0x02FCB3 }, - { (char*) "Atlantic/Azores" , 0x02FF83 }, - { (char*) "Atlantic/Bermuda" , 0x03050E }, - { (char*) "Atlantic/Canary" , 0x03091A }, - { (char*) "Atlantic/Cape_Verde" , 0x030B12 }, - { (char*) "Atlantic/Faeroe" , 0x030BCD }, - { (char*) "Atlantic/Faroe" , 0x030D92 }, - { (char*) "Atlantic/Jan_Mayen" , 0x030F57 }, - { (char*) "Atlantic/Madeira" , 0x031224 }, - { (char*) "Atlantic/Reykjavik" , 0x03179B }, - { (char*) "Atlantic/South_Georgia" , 0x031A98 }, - { (char*) "Atlantic/St_Helena" , 0x031B28 }, - { (char*) "Atlantic/Stanley" , 0x031BC9 }, - { (char*) "Australia/ACT" , 0x031EEA }, - { (char*) "Australia/Adelaide" , 0x03227E }, - { (char*) "Australia/Brisbane" , 0x032632 }, - { (char*) "Australia/Broken_Hill" , 0x032776 }, - { (char*) "Australia/Canberra" , 0x032B4B }, - { (char*) "Australia/Currie" , 0x032EDF }, - { (char*) "Australia/Darwin" , 0x0332D6 }, - { (char*) "Australia/Eucla" , 0x0333DE }, - { (char*) "Australia/Hobart" , 0x03353D }, - { (char*) "Australia/LHI" , 0x03393C }, - { (char*) "Australia/Lindeman" , 0x033BFC }, - { (char*) "Australia/Lord_Howe" , 0x033D6C }, - { (char*) "Australia/Melbourne" , 0x03403C }, - { (char*) "Australia/North" , 0x0343D8 }, - { (char*) "Australia/NSW" , 0x0344CE }, - { (char*) "Australia/Perth" , 0x034862 }, - { (char*) "Australia/Queensland" , 0x0349BE }, - { (char*) "Australia/South" , 0x034AEB }, - { (char*) "Australia/Sydney" , 0x034E90 }, - { (char*) "Australia/Tasmania" , 0x035240 }, - { (char*) "Australia/Victoria" , 0x035637 }, - { (char*) "Australia/West" , 0x0359CB }, - { (char*) "Australia/Yancowinna" , 0x035B09 }, - { (char*) "Brazil/Acre" , 0x035EC2 }, - { (char*) "Brazil/DeNoronha" , 0x036070 }, - { (char*) "Brazil/East" , 0x036260 }, - { (char*) "Brazil/West" , 0x036624 }, - { (char*) "Canada/Atlantic" , 0x0367CC }, - { (char*) "Canada/Central" , 0x036E60 }, - { (char*) "Canada/Eastern" , 0x03737A }, - { (char*) "Canada/Mountain" , 0x037A3B }, - { (char*) "Canada/Newfoundland" , 0x037E11 }, - { (char*) "Canada/Pacific" , 0x038573 }, - { (char*) "Canada/Saskatchewan" , 0x038AB1 }, - { (char*) "Canada/Yukon" , 0x038D3B }, - { (char*) "CET" , 0x03914C }, - { (char*) "Chile/Continental" , 0x0395A7 }, - { (char*) "Chile/EasterIsland" , 0x039AFD }, - { (char*) "CST6CDT" , 0x039F9F }, - { (char*) "Cuba" , 0x03A685 }, - { (char*) "EET" , 0x03AAEE }, - { (char*) "Egypt" , 0x03ADA4 }, - { (char*) "Eire" , 0x03B2CD }, - { (char*) "EST" , 0x03B8B1 }, - { (char*) "EST5EDT" , 0x03B952 }, - { (char*) "Etc/GMT" , 0x03C02E }, - { (char*) "Etc/GMT+0" , 0x03C0A9 }, - { (char*) "Etc/GMT+1" , 0x03C124 }, - { (char*) "Etc/GMT+10" , 0x03C1A1 }, - { (char*) "Etc/GMT+11" , 0x03C21F }, - { (char*) "Etc/GMT+12" , 0x03C29D }, - { (char*) "Etc/GMT+2" , 0x03C31B }, - { (char*) "Etc/GMT+3" , 0x03C398 }, - { (char*) "Etc/GMT+4" , 0x03C415 }, - { (char*) "Etc/GMT+5" , 0x03C492 }, - { (char*) "Etc/GMT+6" , 0x03C50F }, - { (char*) "Etc/GMT+7" , 0x03C58C }, - { (char*) "Etc/GMT+8" , 0x03C609 }, - { (char*) "Etc/GMT+9" , 0x03C686 }, - { (char*) "Etc/GMT-0" , 0x03C703 }, - { (char*) "Etc/GMT-1" , 0x03C77E }, - { (char*) "Etc/GMT-10" , 0x03C7FC }, - { (char*) "Etc/GMT-11" , 0x03C87B }, - { (char*) "Etc/GMT-12" , 0x03C8FA }, - { (char*) "Etc/GMT-13" , 0x03C979 }, - { (char*) "Etc/GMT-14" , 0x03C9F8 }, - { (char*) "Etc/GMT-2" , 0x03CA77 }, - { (char*) "Etc/GMT-3" , 0x03CAF5 }, - { (char*) "Etc/GMT-4" , 0x03CB73 }, - { (char*) "Etc/GMT-5" , 0x03CBF1 }, - { (char*) "Etc/GMT-6" , 0x03CC6F }, - { (char*) "Etc/GMT-7" , 0x03CCED }, - { (char*) "Etc/GMT-8" , 0x03CD6B }, - { (char*) "Etc/GMT-9" , 0x03CDE9 }, - { (char*) "Etc/GMT0" , 0x03CE67 }, - { (char*) "Etc/Greenwich" , 0x03CEE2 }, - { (char*) "Etc/UCT" , 0x03CF5D }, - { (char*) "Etc/Universal" , 0x03CFD8 }, - { (char*) "Etc/UTC" , 0x03D053 }, - { (char*) "Etc/Zulu" , 0x03D0CE }, - { (char*) "Europe/Amsterdam" , 0x03D149 }, - { (char*) "Europe/Andorra" , 0x03D584 }, - { (char*) "Europe/Astrakhan" , 0x03D715 }, - { (char*) "Europe/Athens" , 0x03DA09 }, - { (char*) "Europe/Belfast" , 0x03DCBF }, - { (char*) "Europe/Belgrade" , 0x03E30A }, - { (char*) "Europe/Berlin" , 0x03E4F4 }, - { (char*) "Europe/Bratislava" , 0x03E7D0 }, - { (char*) "Europe/Brussels" , 0x03EAAF }, - { (char*) "Europe/Bucharest" , 0x03EF0A }, - { (char*) "Europe/Budapest" , 0x03F1AB }, - { (char*) "Europe/Busingen" , 0x03F4B5 }, - { (char*) "Europe/Chisinau" , 0x03F6BA }, - { (char*) "Europe/Copenhagen" , 0x03F9B9 }, - { (char*) "Europe/Dublin" , 0x03FC34 }, - { (char*) "Europe/Gibraltar" , 0x040218 }, - { (char*) "Europe/Guernsey" , 0x0406E8 }, - { (char*) "Europe/Helsinki" , 0x040D3F }, - { (char*) "Europe/Isle_of_Man" , 0x040F2C }, - { (char*) "Europe/Istanbul" , 0x041577 }, - { (char*) "Europe/Jersey" , 0x041A33 }, - { (char*) "Europe/Kaliningrad" , 0x04208A }, - { (char*) "Europe/Kiev" , 0x042432 }, - { (char*) "Europe/Kirov" , 0x04266C }, - { (char*) "Europe/Kyiv" , 0x042965 }, - { (char*) "Europe/Lisbon" , 0x042BAE }, - { (char*) "Europe/Ljubljana" , 0x043184 }, - { (char*) "Europe/London" , 0x04336E }, - { (char*) "Europe/Luxembourg" , 0x0439B9 }, - { (char*) "Europe/Madrid" , 0x043E04 }, - { (char*) "Europe/Malta" , 0x0441A1 }, - { (char*) "Europe/Mariehamn" , 0x04454D }, - { (char*) "Europe/Minsk" , 0x04473A }, - { (char*) "Europe/Monaco" , 0x044A6E }, - { (char*) "Europe/Moscow" , 0x044ED4 }, - { (char*) "Europe/Nicosia" , 0x045280 }, - { (char*) "Europe/Oslo" , 0x0454E1 }, - { (char*) "Europe/Paris" , 0x045791 }, - { (char*) "Europe/Podgorica" , 0x045BEE }, - { (char*) "Europe/Prague" , 0x045DD8 }, - { (char*) "Europe/Riga" , 0x0460B7 }, - { (char*) "Europe/Rome" , 0x046379 }, - { (char*) "Europe/Samara" , 0x046738 }, - { (char*) "Europe/San_Marino" , 0x046A39 }, - { (char*) "Europe/Sarajevo" , 0x046DF8 }, - { (char*) "Europe/Saratov" , 0x046FE2 }, - { (char*) "Europe/Simferopol" , 0x0472D4 }, - { (char*) "Europe/Skopje" , 0x047647 }, - { (char*) "Europe/Sofia" , 0x047831 }, - { (char*) "Europe/Stockholm" , 0x047A8D }, - { (char*) "Europe/Tallinn" , 0x047C8A }, - { (char*) "Europe/Tirane" , 0x047F39 }, - { (char*) "Europe/Tiraspol" , 0x0481A1 }, - { (char*) "Europe/Ulyanovsk" , 0x0484A0 }, - { (char*) "Europe/Uzhgorod" , 0x0487B6 }, - { (char*) "Europe/Vaduz" , 0x0489F0 }, - { (char*) "Europe/Vatican" , 0x048BDA }, - { (char*) "Europe/Vienna" , 0x048F99 }, - { (char*) "Europe/Vilnius" , 0x049237 }, - { (char*) "Europe/Volgograd" , 0x0494E7 }, - { (char*) "Europe/Warsaw" , 0x0497F6 }, - { (char*) "Europe/Zagreb" , 0x049B9D }, - { (char*) "Europe/Zaporozhye" , 0x049D87 }, - { (char*) "Europe/Zurich" , 0x049FC1 }, - { (char*) "Factory" , 0x04A1BE }, - { (char*) "GB" , 0x04A23B }, - { (char*) "GB-Eire" , 0x04A886 }, - { (char*) "GMT" , 0x04AED1 }, - { (char*) "GMT+0" , 0x04AF4C }, - { (char*) "GMT-0" , 0x04AFC7 }, - { (char*) "GMT0" , 0x04B042 }, - { (char*) "Greenwich" , 0x04B0BD }, - { (char*) "Hongkong" , 0x04B138 }, - { (char*) "HST" , 0x04B44B }, - { (char*) "Iceland" , 0x04B534 }, - { (char*) "Indian/Antananarivo" , 0x04B5C2 }, - { (char*) "Indian/Chagos" , 0x04B66E }, - { (char*) "Indian/Christmas" , 0x04B712 }, - { (char*) "Indian/Cocos" , 0x04B7A3 }, - { (char*) "Indian/Comoro" , 0x04B83B }, - { (char*) "Indian/Kerguelen" , 0x04B8CA }, - { (char*) "Indian/Mahe" , 0x04B95B }, - { (char*) "Indian/Maldives" , 0x04B9EC }, - { (char*) "Indian/Mauritius" , 0x04BA90 }, - { (char*) "Indian/Mayotte" , 0x04BB4F }, - { (char*) "Indian/Reunion" , 0x04BBDE }, - { (char*) "Iran" , 0x04BC6F }, - { (char*) "Israel" , 0x04BFA7 }, - { (char*) "Jamaica" , 0x04C3E5 }, - { (char*) "Japan" , 0x04C544 }, - { (char*) "Kwajalein" , 0x04C625 }, - { (char*) "Libya" , 0x04C70C }, - { (char*) "MET" , 0x04C8C7 }, - { (char*) "Mexico/BajaNorte" , 0x04CD22 }, - { (char*) "Mexico/BajaSur" , 0x04D165 }, - { (char*) "Mexico/General" , 0x04D423 }, - { (char*) "MST" , 0x04D734 }, - { (char*) "MST7MDT" , 0x04D830 }, - { (char*) "Navajo" , 0x04DC4E }, - { (char*) "NZ" , 0x04E06C }, - { (char*) "NZ-CHAT" , 0x04E48B }, - { (char*) "Pacific/Apia" , 0x04E7BF }, - { (char*) "Pacific/Auckland" , 0x04E962 }, - { (char*) "Pacific/Bougainville" , 0x04ED94 }, - { (char*) "Pacific/Chatham" , 0x04EE75 }, - { (char*) "Pacific/Chuuk" , 0x04F1B8 }, - { (char*) "Pacific/Easter" , 0x04F296 }, - { (char*) "Pacific/Efate" , 0x04F745 }, - { (char*) "Pacific/Enderbury" , 0x04F8A7 }, - { (char*) "Pacific/Fakaofo" , 0x04F95F }, - { (char*) "Pacific/Fiji" , 0x04FA04 }, - { (char*) "Pacific/Funafuti" , 0x04FB9C }, - { (char*) "Pacific/Galapagos" , 0x04FC2E }, - { (char*) "Pacific/Gambier" , 0x04FCFA }, - { (char*) "Pacific/Guadalcanal" , 0x04FD99 }, - { (char*) "Pacific/Guam" , 0x04FE2B }, - { (char*) "Pacific/Honolulu" , 0x04FF95 }, - { (char*) "Pacific/Johnston" , 0x050084 }, - { (char*) "Pacific/Kanton" , 0x05016D }, - { (char*) "Pacific/Kiritimati" , 0x050234 }, - { (char*) "Pacific/Kosrae" , 0x0502FA }, - { (char*) "Pacific/Kwajalein" , 0x0503FE }, - { (char*) "Pacific/Majuro" , 0x0504EE }, - { (char*) "Pacific/Marquesas" , 0x0505EC }, - { (char*) "Pacific/Midway" , 0x050694 }, - { (char*) "Pacific/Nauru" , 0x050757 }, - { (char*) "Pacific/Niue" , 0x05081A }, - { (char*) "Pacific/Norfolk" , 0x0508C0 }, - { (char*) "Pacific/Noumea" , 0x0509B9 }, - { (char*) "Pacific/Pago_Pago" , 0x050A8B }, - { (char*) "Pacific/Palau" , 0x050B29 }, - { (char*) "Pacific/Pitcairn" , 0x050BC9 }, - { (char*) "Pacific/Pohnpei" , 0x050C6E }, - { (char*) "Pacific/Ponape" , 0x050D5E }, - { (char*) "Pacific/Port_Moresby" , 0x050DF0 }, - { (char*) "Pacific/Rarotonga" , 0x050EAE }, - { (char*) "Pacific/Saipan" , 0x051050 }, - { (char*) "Pacific/Samoa" , 0x0511B1 }, - { (char*) "Pacific/Tahiti" , 0x05124F }, - { (char*) "Pacific/Tarawa" , 0x0512EF }, - { (char*) "Pacific/Tongatapu" , 0x051390 }, - { (char*) "Pacific/Truk" , 0x051489 }, - { (char*) "Pacific/Wake" , 0x05152F }, - { (char*) "Pacific/Wallis" , 0x0515CC }, - { (char*) "Pacific/Yap" , 0x05165E }, - { (char*) "Poland" , 0x051704 }, - { (char*) "Portugal" , 0x051AAB }, - { (char*) "PRC" , 0x05206E }, - { (char*) "PST8PDT" , 0x052203 }, - { (char*) "ROC" , 0x05271D }, - { (char*) "ROK" , 0x052928 }, - { (char*) "Singapore" , 0x052AD3 }, - { (char*) "Turkey" , 0x052BDF }, - { (char*) "UCT" , 0x05309B }, - { (char*) "Universal" , 0x053116 }, - { (char*) "US/Alaska" , 0x053191 }, - { (char*) "US/Aleutian" , 0x05356E }, - { (char*) "US/Arizona" , 0x053943 }, - { (char*) "US/Central" , 0x053A3F }, - { (char*) "US/East-Indiana" , 0x054125 }, - { (char*) "US/Eastern" , 0x054344 }, - { (char*) "US/Hawaii" , 0x054A20 }, - { (char*) "US/Indiana-Starke" , 0x054B09 }, - { (char*) "US/Michigan" , 0x054F0D }, - { (char*) "US/Mountain" , 0x05529C }, - { (char*) "US/Pacific" , 0x0556BA }, - { (char*) "US/Samoa" , 0x055BD4 }, - { (char*) "UTC" , 0x055C72 }, - { (char*) "W-SU" , 0x055CED }, - { (char*) "WET" , 0x056085 }, - { (char*) "Zulu" , 0x056648 }, + { (char*) "America/Atikokan" , 0x0076DC }, + { (char*) "America/Atka" , 0x0077E9 }, + { (char*) "America/Bahia" , 0x007BBE }, + { (char*) "America/Bahia_Banderas" , 0x007E79 }, + { (char*) "America/Barbados" , 0x008152 }, + { (char*) "America/Belem" , 0x008274 }, + { (char*) "America/Belize" , 0x00841C }, + { (char*) "America/Blanc-Sablon" , 0x00883D }, + { (char*) "America/Boa_Vista" , 0x008932 }, + { (char*) "America/Bogota" , 0x008AF3 }, + { (char*) "America/Boise" , 0x008BB2 }, + { (char*) "America/Buenos_Aires" , 0x008FC5 }, + { (char*) "America/Cambridge_Bay" , 0x009295 }, + { (char*) "America/Campo_Grande" , 0x009628 }, + { (char*) "America/Cancun" , 0x0099FE }, + { (char*) "America/Caracas" , 0x009C30 }, + { (char*) "America/Catamarca" , 0x009CFA }, + { (char*) "America/Cayenne" , 0x009FCA }, + { (char*) "America/Cayman" , 0x00A06D }, + { (char*) "America/Chicago" , 0x00A10E }, + { (char*) "America/Chihuahua" , 0x00A808 }, + { (char*) "America/Ciudad_Juarez" , 0x00AADD }, + { (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 }, }; -const unsigned char timelib_timezone_db_data_builtin[353987] = { +const unsigned char timelib_timezone_db_data_builtin[354224] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2627,7 +2627,7 @@ const unsigned char timelib_timezone_db_data_builtin[353987] = { 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, 0x4F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x11, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x17, 0xF5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xDA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x97, 0xCA, 0xB0, 0x00, @@ -2667,18 +2667,30 @@ const unsigned char timelib_timezone_db_data_builtin[353987] = { 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xC1, 0x3B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xA1, 0x1D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0xE1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x80, 0xFF, 0x30, 0x00, -0x00, 0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, +0x00, 0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4E, 0x6C, 0x30, 0x00, +0x00, 0x00, 0x00, 0x52, 0x50, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2E, 0x4E, 0x30, 0x00, +0x00, 0x00, 0x00, 0x54, 0x30, 0xC2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0E, 0x30, 0x30, 0x00, +0x00, 0x00, 0x00, 0x56, 0x10, 0xA4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x4C, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x57, 0xF0, 0x86, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x2E, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x59, 0xD0, 0x68, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x10, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x5B, 0xB9, 0x84, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x96, 0xF2, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x5D, 0x99, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x76, 0xD4, 0xB0, 0x00, +0x00, 0x00, 0x00, 0x5F, 0x79, 0x48, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xF1, 0x30, 0x00, +0x00, 0x00, 0x00, 0x61, 0x59, 0x2A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xD3, 0x30, 0x00, +0x00, 0x00, 0x00, 0x63, 0x39, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0xB5, 0x30, 0x00, +0x00, 0x00, 0x00, 0x65, 0x18, 0xEE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFF, 0x97, 0x30, 0x00, +0x00, 0x00, 0x00, 0x67, 0x02, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0x0D, 0xDA, 0xB0, 0x01, +0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, -0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, 0xFF, -0xD5, 0xD0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, 0x00, -0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, -0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, -0x30, 0x2F, 0x30, 0x0A, 0x00, 0x62, 0xC6, 0x75, 0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00, - +0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, +0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x03, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, +0xF0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, +0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, +0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x0A, 0x00, 0x62, 0xC6, +0x75, 0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00, /* America/Atikokan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12352,17 +12364,19 @@ const unsigned char timelib_timezone_db_data_builtin[353987] = { 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, 0x0A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, -0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0x1F, 0x3F, 0x90, 0xFF, -0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x16, 0x30, 0x70, 0xFF, -0xFF, 0xFF, 0xFF, 0xCB, 0xF2, 0xE7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x25, 0x70, 0xFF, -0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xD5, 0xA2, 0xF0, 0x00, -0x00, 0x00, 0x00, 0x0F, 0x75, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x66, 0x7A, 0xF0, 0x01, -0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0x1F, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x71, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, -0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, -0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x9F, -0x94, 0xDD, 0x01, 0xCB, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, +0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0xBB, 0x7A, 0x40, 0xFF, +0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x01, 0x18, 0x70, 0xFF, +0xFF, 0xFF, 0xFF, 0xCB, 0x3F, 0x9B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x8C, 0x03, 0xF0, 0xFF, +0xFF, 0xFF, 0xFF, 0xD1, 0x4B, 0x4D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xB1, 0xE5, 0xF0, 0xFF, +0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xB3, 0x5B, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x0D, 0x9B, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x86, 0x98, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x26, 0x56, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xB1, 0xA8, 0x70, 0x01, +0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0x1F, +0xE8, 0x00, 0x00, 0x00, 0x00, 0x71, 0x68, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, +0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x50, +0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x2D, +0x38, 0x0A, 0x00, 0x9F, 0x96, 0x2A, 0x01, 0xCB, 0x3D, 0x89, 0x00, 0x00, 0x00, 0x00, /* Asia/Muscat */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4F, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -24301,533 +24315,533 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[597] = { { (char*) "America/Argentina/Ushuaia" , 0x00A772 }, { (char*) "America/Aruba" , 0x00ABB9 }, { (char*) "America/Asuncion" , 0x00AC7F }, - { (char*) "America/Atikokan" , 0x00B479 }, - { (char*) "America/Atka" , 0x00B5F6 }, - { (char*) "America/Bahia" , 0x00BF36 }, - { (char*) "America/Bahia_Banderas" , 0x00C339 }, - { (char*) "America/Barbados" , 0x00C7A2 }, - { (char*) "America/Belem" , 0x00C962 }, - { (char*) "America/Belize" , 0x00CBB2 }, - { (char*) "America/Blanc-Sablon" , 0x00D20C }, - { (char*) "America/Boa_Vista" , 0x00D35E }, - { (char*) "America/Bogota" , 0x00D5DB }, - { (char*) "America/Boise" , 0x00D6CF }, - { (char*) "America/Buenos_Aires" , 0x00E065 }, - { (char*) "America/Cambridge_Bay" , 0x00E497 }, - { (char*) "America/Campo_Grande" , 0x00ED85 }, - { (char*) "America/Cancun" , 0x00F339 }, - { (char*) "America/Caracas" , 0x00F6B1 }, - { (char*) "America/Catamarca" , 0x00F7B7 }, - { (char*) "America/Cayenne" , 0x00FBE9 }, - { (char*) "America/Cayman" , 0x00FCAD }, - { (char*) "America/Chicago" , 0x00FD6F }, - { (char*) "America/Chihuahua" , 0x010B97 }, - { (char*) "America/Ciudad_Juarez" , 0x011007 }, - { (char*) "America/Coral_Harbour" , 0x011631 }, - { (char*) "America/Cordoba" , 0x0116F3 }, - { (char*) "America/Costa_Rica" , 0x011B25 }, - { (char*) "America/Creston" , 0x011C6D }, - { (char*) "America/Cuiaba" , 0x011D5B }, - { (char*) "America/Curacao" , 0x0122EC }, - { (char*) "America/Danmarkshavn" , 0x0123B2 }, - { (char*) "America/Dawson" , 0x012692 }, - { (char*) "America/Dawson_Creek" , 0x012CFE }, - { (char*) "America/Denver" , 0x013144 }, - { (char*) "America/Detroit" , 0x013B01 }, - { (char*) "America/Dominica" , 0x0143DC }, - { (char*) "America/Edmonton" , 0x01447C }, - { (char*) "America/Eirunepe" , 0x014DC6 }, - { (char*) "America/El_Salvador" , 0x015063 }, - { (char*) "America/Ensenada" , 0x01514F }, - { (char*) "America/Fort_Nelson" , 0x015AF5 }, - { (char*) "America/Fort_Wayne" , 0x0163D5 }, - { (char*) "America/Fortaleza" , 0x016A73 }, - { (char*) "America/Glace_Bay" , 0x016D63 }, - { (char*) "America/Godthab" , 0x01761A }, - { (char*) "America/Goose_Bay" , 0x017D87 }, - { (char*) "America/Grand_Turk" , 0x018A3D }, - { (char*) "America/Grenada" , 0x019173 }, - { (char*) "America/Guadeloupe" , 0x019213 }, - { (char*) "America/Guatemala" , 0x0192B3 }, - { (char*) "America/Guayaquil" , 0x0193D7 }, - { (char*) "America/Guyana" , 0x0194DD }, - { (char*) "America/Halifax" , 0x0195E1 }, - { (char*) "America/Havana" , 0x01A36B }, - { (char*) "America/Hermosillo" , 0x01ACE7 }, - { (char*) "America/Indiana/Indianapolis" , 0x01AE7D }, - { (char*) "America/Indiana/Knox" , 0x01B534 }, - { (char*) "America/Indiana/Marengo" , 0x01BEE1 }, - { (char*) "America/Indiana/Petersburg" , 0x01C5CE }, - { (char*) "America/Indiana/Tell_City" , 0x01CD6D }, - { (char*) "America/Indiana/Vevay" , 0x01D431 }, - { (char*) "America/Indiana/Vincennes" , 0x01D9ED }, - { (char*) "America/Indiana/Winamac" , 0x01E0C3 }, - { (char*) "America/Indianapolis" , 0x01E7E7 }, - { (char*) "America/Inuvik" , 0x01EE85 }, - { (char*) "America/Iqaluit" , 0x01F6BF }, - { (char*) "America/Jamaica" , 0x01FF7E }, - { (char*) "America/Jujuy" , 0x02016C }, - { (char*) "America/Juneau" , 0x020582 }, - { (char*) "America/Kentucky/Louisville" , 0x020ED3 }, - { (char*) "America/Kentucky/Monticello" , 0x0219E1 }, - { (char*) "America/Knox_IN" , 0x022341 }, - { (char*) "America/Kralendijk" , 0x022CD9 }, - { (char*) "America/La_Paz" , 0x022DDB }, - { (char*) "America/Lima" , 0x022EC1 }, - { (char*) "America/Los_Angeles" , 0x023055 }, - { (char*) "America/Louisville" , 0x023B8C }, - { (char*) "America/Lower_Princes" , 0x02467C }, - { (char*) "America/Maceio" , 0x02477E }, - { (char*) "America/Managua" , 0x024A74 }, - { (char*) "America/Manaus" , 0x024C2E }, - { (char*) "America/Marigot" , 0x024E97 }, - { (char*) "America/Martinique" , 0x024F99 }, - { (char*) "America/Matamoros" , 0x02508D }, - { (char*) "America/Mazatlan" , 0x02564F }, - { (char*) "America/Mendoza" , 0x025AB1 }, - { (char*) "America/Menominee" , 0x025EE3 }, - { (char*) "America/Merida" , 0x0267F0 }, - { (char*) "America/Metlakatla" , 0x026BF9 }, - { (char*) "America/Mexico_City" , 0x0271AB }, - { (char*) "America/Miquelon" , 0x02768B }, - { (char*) "America/Moncton" , 0x027D0B }, - { (char*) "America/Monterrey" , 0x028981 }, - { (char*) "America/Montevideo" , 0x028E1D }, - { (char*) "America/Montreal" , 0x029401 }, - { (char*) "America/Montserrat" , 0x02A1B3 }, - { (char*) "America/Nassau" , 0x02A253 }, - { (char*) "America/New_York" , 0x02ABB3 }, - { (char*) "America/Nipigon" , 0x02B9B3 }, - { (char*) "America/Nome" , 0x02C765 }, - { (char*) "America/Noronha" , 0x02D0BD }, - { (char*) "America/North_Dakota/Beulah" , 0x02D397 }, - { (char*) "America/North_Dakota/Center" , 0x02DD14 }, - { (char*) "America/North_Dakota/New_Salem" , 0x02E691 }, - { (char*) "America/Nuuk" , 0x02F014 }, - { (char*) "America/Ojinaga" , 0x02F792 }, - { (char*) "America/Panama" , 0x02FDAE }, - { (char*) "America/Pangnirtung" , 0x02FE70 }, - { (char*) "America/Paramaribo" , 0x030716 }, - { (char*) "America/Phoenix" , 0x03081A }, - { (char*) "America/Port-au-Prince" , 0x0309A6 }, - { (char*) "America/Port_of_Spain" , 0x030F4C }, - { (char*) "America/Porto_Acre" , 0x030FEC }, - { (char*) "America/Porto_Velho" , 0x03125E }, - { (char*) "America/Puerto_Rico" , 0x0314A4 }, - { (char*) "America/Punta_Arenas" , 0x0315A6 }, - { (char*) "America/Rainy_River" , 0x031D34 }, - { (char*) "America/Rankin_Inlet" , 0x032874 }, - { (char*) "America/Recife" , 0x0330A8 }, - { (char*) "America/Regina" , 0x03337C }, - { (char*) "America/Resolute" , 0x033771 }, - { (char*) "America/Rio_Branco" , 0x033FA6 }, - { (char*) "America/Rosario" , 0x03421C }, - { (char*) "America/Santa_Isabel" , 0x03464E }, - { (char*) "America/Santarem" , 0x034FF4 }, - { (char*) "America/Santiago" , 0x035257 }, - { (char*) "America/Santo_Domingo" , 0x035C43 }, - { (char*) "America/Sao_Paulo" , 0x035E19 }, - { (char*) "America/Scoresbysund" , 0x0363F1 }, - { (char*) "America/Shiprock" , 0x036BA9 }, - { (char*) "America/Sitka" , 0x037551 }, - { (char*) "America/St_Barthelemy" , 0x037E89 }, - { (char*) "America/St_Johns" , 0x037F8B }, - { (char*) "America/St_Kitts" , 0x038DF9 }, - { (char*) "America/St_Lucia" , 0x038E99 }, - { (char*) "America/St_Thomas" , 0x038F5B }, - { (char*) "America/St_Vincent" , 0x038FFB }, - { (char*) "America/Swift_Current" , 0x0390BD }, - { (char*) "America/Tegucigalpa" , 0x03930B }, - { (char*) "America/Thule" , 0x039413 }, - { (char*) "America/Thunder_Bay" , 0x039A0B }, - { (char*) "America/Tijuana" , 0x03A7BD }, - { (char*) "America/Toronto" , 0x03B172 }, - { (char*) "America/Tortola" , 0x03BF42 }, - { (char*) "America/Vancouver" , 0x03BFE2 }, - { (char*) "America/Virgin" , 0x03CB53 }, - { (char*) "America/Whitehorse" , 0x03CC55 }, - { (char*) "America/Winnipeg" , 0x03D2C1 }, - { (char*) "America/Yakutat" , 0x03DE1E }, - { (char*) "America/Yellowknife" , 0x03E73B }, - { (char*) "Antarctica/Casey" , 0x03F063 }, - { (char*) "Antarctica/Davis" , 0x03F21B }, - { (char*) "Antarctica/DumontDUrville" , 0x03F347 }, - { (char*) "Antarctica/Macquarie" , 0x03F417 }, - { (char*) "Antarctica/Mawson" , 0x03FD07 }, - { (char*) "Antarctica/McMurdo" , 0x03FDD2 }, - { (char*) "Antarctica/Palmer" , 0x0405CD }, - { (char*) "Antarctica/Rothera" , 0x040B5B }, - { (char*) "Antarctica/South_Pole" , 0x040C04 }, - { (char*) "Antarctica/Syowa" , 0x041595 }, - { (char*) "Antarctica/Troll" , 0x04163D }, - { (char*) "Antarctica/Vostok" , 0x041ACA }, - { (char*) "Arctic/Longyearbyen" , 0x041BB1 }, - { (char*) "Asia/Aden" , 0x0424B7 }, - { (char*) "Asia/Almaty" , 0x04255A }, - { (char*) "Asia/Amman" , 0x04294F }, - { (char*) "Asia/Anadyr" , 0x042EF4 }, - { (char*) "Asia/Aqtau" , 0x0433A9 }, - { (char*) "Asia/Aqtobe" , 0x043793 }, - { (char*) "Asia/Ashgabat" , 0x043B91 }, - { (char*) "Asia/Ashkhabad" , 0x043DFA }, - { (char*) "Asia/Atyrau" , 0x044063 }, - { (char*) "Asia/Baghdad" , 0x044455 }, - { (char*) "Asia/Bahrain" , 0x04482A }, - { (char*) "Asia/Baku" , 0x044915 }, - { (char*) "Asia/Bangkok" , 0x044DDE }, - { (char*) "Asia/Barnaul" , 0x044EA3 }, - { (char*) "Asia/Beirut" , 0x045374 }, - { (char*) "Asia/Bishkek" , 0x045BEA }, - { (char*) "Asia/Brunei" , 0x045FBF }, - { (char*) "Asia/Calcutta" , 0x046088 }, - { (char*) "Asia/Chita" , 0x0461B1 }, - { (char*) "Asia/Choibalsan" , 0x046688 }, - { (char*) "Asia/Chongqing" , 0x046A01 }, - { (char*) "Asia/Chungking" , 0x046C3E }, - { (char*) "Asia/Colombo" , 0x046E7B }, - { (char*) "Asia/Dacca" , 0x046FED }, - { (char*) "Asia/Damascus" , 0x04713C }, - { (char*) "Asia/Dhaka" , 0x047899 }, - { (char*) "Asia/Dili" , 0x0479E8 }, - { (char*) "Asia/Dubai" , 0x047AF5 }, - { (char*) "Asia/Dushanbe" , 0x047B98 }, - { (char*) "Asia/Famagusta" , 0x047DE5 }, - { (char*) "Asia/Gaza" , 0x0485EC }, - { (char*) "Asia/Harbin" , 0x049506 }, - { (char*) "Asia/Hebron" , 0x049743 }, - { (char*) "Asia/Ho_Chi_Minh" , 0x04A678 }, - { (char*) "Asia/Hong_Kong" , 0x04A7D5 }, - { (char*) "Asia/Hovd" , 0x04ACB2 }, - { (char*) "Asia/Irkutsk" , 0x04B041 }, - { (char*) "Asia/Istanbul" , 0x04B534 }, - { (char*) "Asia/Jakarta" , 0x04BCCD }, - { (char*) "Asia/Jayapura" , 0x04BE65 }, - { (char*) "Asia/Jerusalem" , 0x04BF84 }, - { (char*) "Asia/Kabul" , 0x04C8E4 }, - { (char*) "Asia/Kamchatka" , 0x04C9B2 }, - { (char*) "Asia/Karachi" , 0x04CE50 }, - { (char*) "Asia/Kashgar" , 0x04CFD7 }, - { (char*) "Asia/Kathmandu" , 0x04D07A }, - { (char*) "Asia/Katmandu" , 0x04D14C }, - { (char*) "Asia/Khandyga" , 0x04D21E }, - { (char*) "Asia/Kolkata" , 0x04D731 }, - { (char*) "Asia/Krasnoyarsk" , 0x04D85A }, - { (char*) "Asia/Kuala_Lumpur" , 0x04DD28 }, - { (char*) "Asia/Kuching" , 0x04DED9 }, - { (char*) "Asia/Kuwait" , 0x04E0C8 }, - { (char*) "Asia/Macao" , 0x04E16B }, - { (char*) "Asia/Macau" , 0x04E642 }, - { (char*) "Asia/Magadan" , 0x04EB19 }, - { (char*) "Asia/Makassar" , 0x04EFED }, - { (char*) "Asia/Manila" , 0x04F140 }, - { (char*) "Asia/Muscat" , 0x04F294 }, - { (char*) "Asia/Nicosia" , 0x04F337 }, - { (char*) "Asia/Novokuznetsk" , 0x04FB23 }, - { (char*) "Asia/Novosibirsk" , 0x04FFBF }, - { (char*) "Asia/Omsk" , 0x050496 }, - { (char*) "Asia/Oral" , 0x050958 }, - { (char*) "Asia/Phnom_Penh" , 0x050D52 }, - { (char*) "Asia/Pontianak" , 0x050E77 }, - { (char*) "Asia/Pyongyang" , 0x050FFA }, - { (char*) "Asia/Qatar" , 0x0510F3 }, - { (char*) "Asia/Qostanay" , 0x0511B8 }, - { (char*) "Asia/Qyzylorda" , 0x0515DF }, - { (char*) "Asia/Rangoon" , 0x0519FB }, - { (char*) "Asia/Riyadh" , 0x051B05 }, - { (char*) "Asia/Saigon" , 0x051BA8 }, - { (char*) "Asia/Sakhalin" , 0x051D05 }, - { (char*) "Asia/Samarkand" , 0x0521CD }, - { (char*) "Asia/Seoul" , 0x05241D }, - { (char*) "Asia/Shanghai" , 0x052692 }, - { (char*) "Asia/Singapore" , 0x0528DB }, - { (char*) "Asia/Srednekolymsk" , 0x052A78 }, - { (char*) "Asia/Taipei" , 0x052F4C }, - { (char*) "Asia/Tashkent" , 0x053251 }, - { (char*) "Asia/Tbilisi" , 0x0534AF }, - { (char*) "Asia/Tehran" , 0x0538B8 }, - { (char*) "Asia/Tel_Aviv" , 0x053DA4 }, - { (char*) "Asia/Thimbu" , 0x054704 }, - { (char*) "Asia/Thimphu" , 0x0547CD }, - { (char*) "Asia/Tokyo" , 0x054896 }, - { (char*) "Asia/Tomsk" , 0x0549D7 }, - { (char*) "Asia/Ujung_Pandang" , 0x054EA8 }, - { (char*) "Asia/Ulaanbaatar" , 0x054FB2 }, - { (char*) "Asia/Ulan_Bator" , 0x05533B }, - { (char*) "Asia/Urumqi" , 0x0556B4 }, - { (char*) "Asia/Ust-Nera" , 0x055764 }, - { (char*) "Asia/Vientiane" , 0x055C5A }, - { (char*) "Asia/Vladivostok" , 0x055D9B }, - { (char*) "Asia/Yakutsk" , 0x056264 }, - { (char*) "Asia/Yangon" , 0x05672C }, - { (char*) "Asia/Yekaterinburg" , 0x056836 }, - { (char*) "Asia/Yerevan" , 0x056D1D }, - { (char*) "Atlantic/Azores" , 0x05719A }, - { (char*) "Atlantic/Bermuda" , 0x057F1E }, - { (char*) "Atlantic/Canary" , 0x058886 }, - { (char*) "Atlantic/Cape_Verde" , 0x059009 }, - { (char*) "Atlantic/Faeroe" , 0x059115 }, - { (char*) "Atlantic/Faroe" , 0x059838 }, - { (char*) "Atlantic/Jan_Mayen" , 0x059F5B }, - { (char*) "Atlantic/Madeira" , 0x05A861 }, - { (char*) "Atlantic/Reykjavik" , 0x05B5AD }, - { (char*) "Atlantic/South_Georgia" , 0x05BA43 }, - { (char*) "Atlantic/St_Helena" , 0x05BAE5 }, - { (char*) "Atlantic/Stanley" , 0x05BBA7 }, - { (char*) "Australia/ACT" , 0x05C063 }, - { (char*) "Australia/Adelaide" , 0x05C8FD }, - { (char*) "Australia/Brisbane" , 0x05D1B8 }, - { (char*) "Australia/Broken_Hill" , 0x05D37E }, - { (char*) "Australia/Canberra" , 0x05DC5B }, - { (char*) "Australia/Currie" , 0x05E4F5 }, - { (char*) "Australia/Darwin" , 0x05EE37 }, - { (char*) "Australia/Eucla" , 0x05EF9A }, - { (char*) "Australia/Hobart" , 0x05F187 }, - { (char*) "Australia/LHI" , 0x05FAD1 }, - { (char*) "Australia/Lindeman" , 0x060213 }, - { (char*) "Australia/Lord_Howe" , 0x060419 }, - { (char*) "Australia/Melbourne" , 0x060B6B }, - { (char*) "Australia/North" , 0x06140D }, - { (char*) "Australia/NSW" , 0x06155E }, - { (char*) "Australia/Perth" , 0x061DF8 }, - { (char*) "Australia/Queensland" , 0x061FE0 }, - { (char*) "Australia/South" , 0x06218F }, - { (char*) "Australia/Sydney" , 0x062A3B }, - { (char*) "Australia/Tasmania" , 0x0632F1 }, - { (char*) "Australia/Victoria" , 0x063C33 }, - { (char*) "Australia/West" , 0x0644CD }, - { (char*) "Australia/Yancowinna" , 0x064697 }, - { (char*) "Brazil/Acre" , 0x064F58 }, - { (char*) "Brazil/DeNoronha" , 0x0651CA }, - { (char*) "Brazil/East" , 0x065494 }, - { (char*) "Brazil/West" , 0x065A36 }, - { (char*) "Canada/Atlantic" , 0x065C90 }, - { (char*) "Canada/Central" , 0x0669FC }, - { (char*) "Canada/Eastern" , 0x06753C }, - { (char*) "Canada/Mountain" , 0x0682EE }, - { (char*) "Canada/Newfoundland" , 0x068C16 }, - { (char*) "Canada/Pacific" , 0x069A69 }, - { (char*) "Canada/Saskatchewan" , 0x06A5C1 }, - { (char*) "Canada/Yukon" , 0x06A9A1 }, - { (char*) "CET" , 0x06AFFB }, - { (char*) "Chile/Continental" , 0x06BB7C }, - { (char*) "Chile/EasterIsland" , 0x06C55B }, - { (char*) "CST6CDT" , 0x06CE12 }, - { (char*) "Cuba" , 0x06DC26 }, - { (char*) "EET" , 0x06E5A2 }, - { (char*) "Egypt" , 0x06EE84 }, - { (char*) "Eire" , 0x06F7EF }, - { (char*) "EST" , 0x07059F }, - { (char*) "EST5EDT" , 0x070661 }, - { (char*) "Etc/GMT" , 0x07144D }, - { (char*) "Etc/GMT+0" , 0x0714CB }, - { (char*) "Etc/GMT+1" , 0x071549 }, - { (char*) "Etc/GMT+10" , 0x0715C9 }, - { (char*) "Etc/GMT+11" , 0x07164A }, - { (char*) "Etc/GMT+12" , 0x0716CB }, - { (char*) "Etc/GMT+2" , 0x07174C }, - { (char*) "Etc/GMT+3" , 0x0717CC }, - { (char*) "Etc/GMT+4" , 0x07184C }, - { (char*) "Etc/GMT+5" , 0x0718CC }, - { (char*) "Etc/GMT+6" , 0x07194C }, - { (char*) "Etc/GMT+7" , 0x0719CC }, - { (char*) "Etc/GMT+8" , 0x071A4C }, - { (char*) "Etc/GMT+9" , 0x071ACC }, - { (char*) "Etc/GMT-0" , 0x071B4C }, - { (char*) "Etc/GMT-1" , 0x071BCA }, - { (char*) "Etc/GMT-10" , 0x071C4B }, - { (char*) "Etc/GMT-11" , 0x071CCD }, - { (char*) "Etc/GMT-12" , 0x071D4F }, - { (char*) "Etc/GMT-13" , 0x071DD1 }, - { (char*) "Etc/GMT-14" , 0x071E53 }, - { (char*) "Etc/GMT-2" , 0x071ED5 }, - { (char*) "Etc/GMT-3" , 0x071F56 }, - { (char*) "Etc/GMT-4" , 0x071FD7 }, - { (char*) "Etc/GMT-5" , 0x072058 }, - { (char*) "Etc/GMT-6" , 0x0720D9 }, - { (char*) "Etc/GMT-7" , 0x07215A }, - { (char*) "Etc/GMT-8" , 0x0721DB }, - { (char*) "Etc/GMT-9" , 0x07225C }, - { (char*) "Etc/GMT0" , 0x0722DD }, - { (char*) "Etc/Greenwich" , 0x07235B }, - { (char*) "Etc/UCT" , 0x0723D9 }, - { (char*) "Etc/Universal" , 0x072457 }, - { (char*) "Etc/UTC" , 0x0724D5 }, - { (char*) "Etc/Zulu" , 0x072553 }, - { (char*) "Europe/Amsterdam" , 0x0725D1 }, - { (char*) "Europe/Andorra" , 0x07313B }, - { (char*) "Europe/Astrakhan" , 0x073815 }, - { (char*) "Europe/Athens" , 0x073CB2 }, - { (char*) "Europe/Belfast" , 0x074594 }, - { (char*) "Europe/Belgrade" , 0x0753F0 }, - { (char*) "Europe/Berlin" , 0x075B7C }, - { (char*) "Europe/Bratislava" , 0x076491 }, - { (char*) "Europe/Brussels" , 0x076D9A }, - { (char*) "Europe/Bucharest" , 0x07791B }, - { (char*) "Europe/Budapest" , 0x0781AF }, - { (char*) "Europe/Busingen" , 0x078AFB }, - { (char*) "Europe/Chisinau" , 0x079284 }, - { (char*) "Europe/Copenhagen" , 0x079BE6 }, - { (char*) "Europe/Dublin" , 0x07A44B }, - { (char*) "Europe/Gibraltar" , 0x07B1FB }, - { (char*) "Europe/Guernsey" , 0x07BE03 }, - { (char*) "Europe/Helsinki" , 0x07CCA3 }, - { (char*) "Europe/Isle_of_Man" , 0x07D41B }, - { (char*) "Europe/Istanbul" , 0x07E267 }, - { (char*) "Europe/Jersey" , 0x07EA00 }, - { (char*) "Europe/Kaliningrad" , 0x07F8A0 }, - { (char*) "Europe/Kiev" , 0x07FE95 }, - { (char*) "Europe/Kirov" , 0x0806E9 }, - { (char*) "Europe/Kyiv" , 0x080BA4 }, - { (char*) "Europe/Lisbon" , 0x081407 }, - { (char*) "Europe/Ljubljana" , 0x0821ED }, - { (char*) "Europe/London" , 0x082979 }, - { (char*) "Europe/Luxembourg" , 0x0837D5 }, - { (char*) "Europe/Madrid" , 0x084363 }, - { (char*) "Europe/Malta" , 0x084DB5 }, - { (char*) "Europe/Mariehamn" , 0x0857FD }, - { (char*) "Europe/Minsk" , 0x085F75 }, - { (char*) "Europe/Monaco" , 0x08649C }, - { (char*) "Europe/Moscow" , 0x087028 }, - { (char*) "Europe/Nicosia" , 0x087647 }, - { (char*) "Europe/Oslo" , 0x087E25 }, - { (char*) "Europe/Paris" , 0x0886E5 }, - { (char*) "Europe/Podgorica" , 0x089283 }, - { (char*) "Europe/Prague" , 0x089A0F }, - { (char*) "Europe/Riga" , 0x08A318 }, - { (char*) "Europe/Rome" , 0x08ABBA }, - { (char*) "Europe/Samara" , 0x08B617 }, - { (char*) "Europe/San_Marino" , 0x08BAED }, - { (char*) "Europe/Sarajevo" , 0x08C54A }, - { (char*) "Europe/Saratov" , 0x08CCD6 }, - { (char*) "Europe/Simferopol" , 0x08D183 }, - { (char*) "Europe/Skopje" , 0x08D752 }, - { (char*) "Europe/Sofia" , 0x08DEDE }, - { (char*) "Europe/Stockholm" , 0x08E707 }, - { (char*) "Europe/Tallinn" , 0x08EE88 }, - { (char*) "Europe/Tirane" , 0x08F6F8 }, - { (char*) "Europe/Tiraspol" , 0x08FF28 }, - { (char*) "Europe/Ulyanovsk" , 0x09088A }, - { (char*) "Europe/Uzhgorod" , 0x090D8D }, - { (char*) "Europe/Vaduz" , 0x0915E1 }, - { (char*) "Europe/Vatican" , 0x091D4D }, - { (char*) "Europe/Vienna" , 0x0927AA }, - { (char*) "Europe/Vilnius" , 0x09304E }, - { (char*) "Europe/Volgograd" , 0x0938CC }, - { (char*) "Europe/Warsaw" , 0x093D93 }, - { (char*) "Europe/Zagreb" , 0x0947FD }, - { (char*) "Europe/Zaporozhye" , 0x094F89 }, - { (char*) "Europe/Zurich" , 0x0957DD }, - { (char*) "Factory" , 0x095F5E }, - { (char*) "GB" , 0x095FDE }, - { (char*) "GB-Eire" , 0x096E3A }, - { (char*) "GMT" , 0x097C96 }, - { (char*) "GMT+0" , 0x097D14 }, - { (char*) "GMT-0" , 0x097D92 }, - { (char*) "GMT0" , 0x097E10 }, - { (char*) "Greenwich" , 0x097E8E }, - { (char*) "Hongkong" , 0x097F0C }, - { (char*) "HST" , 0x0983E9 }, - { (char*) "Iceland" , 0x09853E }, - { (char*) "Indian/Antananarivo" , 0x0985DE }, - { (char*) "Indian/Chagos" , 0x0986C5 }, - { (char*) "Indian/Christmas" , 0x09878A }, - { (char*) "Indian/Cocos" , 0x09882D }, - { (char*) "Indian/Comoro" , 0x0988D9 }, - { (char*) "Indian/Kerguelen" , 0x09897A }, - { (char*) "Indian/Mahe" , 0x098A1D }, - { (char*) "Indian/Maldives" , 0x098AC0 }, - { (char*) "Indian/Mauritius" , 0x098B85 }, - { (char*) "Indian/Mayotte" , 0x098C74 }, - { (char*) "Indian/Reunion" , 0x098D15 }, - { (char*) "Iran" , 0x098DB8 }, - { (char*) "Israel" , 0x0992A4 }, - { (char*) "Jamaica" , 0x099C04 }, - { (char*) "Japan" , 0x099DF2 }, - { (char*) "Kwajalein" , 0x099F33 }, - { (char*) "Libya" , 0x09A06D }, - { (char*) "MET" , 0x09A2EA }, - { (char*) "Mexico/BajaNorte" , 0x09AE6B }, - { (char*) "Mexico/BajaSur" , 0x09B811 }, - { (char*) "Mexico/General" , 0x09BC41 }, - { (char*) "MST" , 0x09C113 }, - { (char*) "MST7MDT" , 0x09C287 }, - { (char*) "Navajo" , 0x09CC2F }, - { (char*) "NZ" , 0x09D5D7 }, - { (char*) "NZ-CHAT" , 0x09DF68 }, - { (char*) "Pacific/Apia" , 0x09E77A }, - { (char*) "Pacific/Auckland" , 0x09E9DC }, - { (char*) "Pacific/Bougainville" , 0x09F380 }, - { (char*) "Pacific/Chatham" , 0x09F496 }, - { (char*) "Pacific/Chuuk" , 0x09FCB7 }, - { (char*) "Pacific/Easter" , 0x09FDD1 }, - { (char*) "Pacific/Efate" , 0x0A0695 }, - { (char*) "Pacific/Enderbury" , 0x0A08AD }, - { (char*) "Pacific/Fakaofo" , 0x0A0995 }, - { (char*) "Pacific/Fiji" , 0x0A0A5B }, - { (char*) "Pacific/Funafuti" , 0x0A0C9B }, - { (char*) "Pacific/Galapagos" , 0x0A0D3F }, - { (char*) "Pacific/Gambier" , 0x0A0E3C }, - { (char*) "Pacific/Guadalcanal" , 0x0A0EED }, - { (char*) "Pacific/Guam" , 0x0A0F91 }, - { (char*) "Pacific/Honolulu" , 0x0A118B }, - { (char*) "Pacific/Johnston" , 0x0A12E6 }, - { (char*) "Pacific/Kanton" , 0x0A143B }, - { (char*) "Pacific/Kiritimati" , 0x0A1532 }, - { (char*) "Pacific/Kosrae" , 0x0A162A }, - { (char*) "Pacific/Kwajalein" , 0x0A178D }, - { (char*) "Pacific/Majuro" , 0x0A18D0 }, - { (char*) "Pacific/Marquesas" , 0x0A1A1C }, - { (char*) "Pacific/Midway" , 0x0A1AD8 }, - { (char*) "Pacific/Nauru" , 0x0A1BCB }, - { (char*) "Pacific/Niue" , 0x0A1CC5 }, - { (char*) "Pacific/Norfolk" , 0x0A1D8E }, - { (char*) "Pacific/Noumea" , 0x0A20FC }, - { (char*) "Pacific/Pago_Pago" , 0x0A222A }, - { (char*) "Pacific/Palau" , 0x0A22E5 }, - { (char*) "Pacific/Pitcairn" , 0x0A2397 }, - { (char*) "Pacific/Pohnpei" , 0x0A245F }, - { (char*) "Pacific/Ponape" , 0x0A259A }, - { (char*) "Pacific/Port_Moresby" , 0x0A263E }, - { (char*) "Pacific/Rarotonga" , 0x0A270E }, - { (char*) "Pacific/Saipan" , 0x0A2967 }, - { (char*) "Pacific/Samoa" , 0x0A2B53 }, - { (char*) "Pacific/Tahiti" , 0x0A2C0E }, - { (char*) "Pacific/Tarawa" , 0x0A2CC0 }, - { (char*) "Pacific/Tongatapu" , 0x0A2D73 }, - { (char*) "Pacific/Truk" , 0x0A2EE5 }, - { (char*) "Pacific/Wake" , 0x0A2F9D }, - { (char*) "Pacific/Wallis" , 0x0A304C }, - { (char*) "Pacific/Yap" , 0x0A30F0 }, - { (char*) "Poland" , 0x0A31A8 }, - { (char*) "Portugal" , 0x0A3C12 }, - { (char*) "PRC" , 0x0A49E5 }, - { (char*) "PST8PDT" , 0x0A4C22 }, - { (char*) "ROC" , 0x0A5752 }, - { (char*) "ROK" , 0x0A5A57 }, - { (char*) "Singapore" , 0x0A5CCC }, - { (char*) "Turkey" , 0x0A5E69 }, - { (char*) "UCT" , 0x0A6602 }, - { (char*) "Universal" , 0x0A6680 }, - { (char*) "US/Alaska" , 0x0A66FE }, - { (char*) "US/Aleutian" , 0x0A704D }, - { (char*) "US/Arizona" , 0x0A798D }, - { (char*) "US/Central" , 0x0A7B01 }, - { (char*) "US/East-Indiana" , 0x0A8915 }, - { (char*) "US/Eastern" , 0x0A8FB3 }, - { (char*) "US/Hawaii" , 0x0A9D9F }, - { (char*) "US/Indiana-Starke" , 0x0A9EF4 }, - { (char*) "US/Michigan" , 0x0AA88C }, - { (char*) "US/Mountain" , 0x0AB14E }, - { (char*) "US/Pacific" , 0x0ABAF6 }, - { (char*) "US/Samoa" , 0x0AC626 }, - { (char*) "UTC" , 0x0AC6E1 }, - { (char*) "W-SU" , 0x0AC75F }, - { (char*) "WET" , 0x0ACD6A }, - { (char*) "Zulu" , 0x0ADB3D }, + { (char*) "America/Atikokan" , 0x00B2F7 }, + { (char*) "America/Atka" , 0x00B474 }, + { (char*) "America/Bahia" , 0x00BDB4 }, + { (char*) "America/Bahia_Banderas" , 0x00C1B7 }, + { (char*) "America/Barbados" , 0x00C620 }, + { (char*) "America/Belem" , 0x00C7E0 }, + { (char*) "America/Belize" , 0x00CA30 }, + { (char*) "America/Blanc-Sablon" , 0x00D08A }, + { (char*) "America/Boa_Vista" , 0x00D1DC }, + { (char*) "America/Bogota" , 0x00D459 }, + { (char*) "America/Boise" , 0x00D54D }, + { (char*) "America/Buenos_Aires" , 0x00DEE3 }, + { (char*) "America/Cambridge_Bay" , 0x00E315 }, + { (char*) "America/Campo_Grande" , 0x00EC03 }, + { (char*) "America/Cancun" , 0x00F1B7 }, + { (char*) "America/Caracas" , 0x00F52F }, + { (char*) "America/Catamarca" , 0x00F635 }, + { (char*) "America/Cayenne" , 0x00FA67 }, + { (char*) "America/Cayman" , 0x00FB2B }, + { (char*) "America/Chicago" , 0x00FBED }, + { (char*) "America/Chihuahua" , 0x010A15 }, + { (char*) "America/Ciudad_Juarez" , 0x010E85 }, + { (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 }, }; -const unsigned char timelib_timezone_db_data_builtin[711611] = { +const unsigned char timelib_timezone_db_data_builtin[711319] = { /* Africa/Abidjan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -27783,7 +27797,7 @@ const unsigned char timelib_timezone_db_data_builtin[711611] = { /* America/Asuncion */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x59, 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, 0x81, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0xB8, 0x17, 0xF5, 0x90, 0x05, 0x2B, 0xDA, 0x40, 0x07, 0xFC, 0xF0, 0xB0, 0x0A, 0xCF, 0x74, 0xC0, 0x0B, 0x97, 0xCA, 0xB0, 0x0C, 0xB1, 0xF9, 0xC0, 0x0D, 0x78, 0xFE, 0x30, 0x0E, 0x93, 0x2D, 0x40, 0x0F, 0x5A, 0x31, 0xB0, 0x10, 0x74, 0x60, 0xC0, 0x11, 0x64, 0x43, 0xB0, 0x12, 0x55, 0x94, 0x40, @@ -27809,106 +27823,82 @@ const unsigned char timelib_timezone_db_data_builtin[711611] = { 0x5A, 0xB7, 0x10, 0xB0, 0x5B, 0xB9, 0x84, 0xC0, 0x5C, 0x96, 0xF2, 0xB0, 0x5D, 0x99, 0x66, 0xC0, 0x5E, 0x76, 0xD4, 0xB0, 0x5F, 0x79, 0x48, 0xC0, 0x60, 0x5F, 0xF1, 0x30, 0x61, 0x59, 0x2A, 0xC0, 0x62, 0x3F, 0xD3, 0x30, 0x63, 0x39, 0x0C, 0xC0, 0x64, 0x1F, 0xB5, 0x30, 0x65, 0x18, 0xEE, 0xC0, -0x65, 0xFF, 0x97, 0x30, 0x67, 0x02, 0x0B, 0x40, 0x67, 0xDF, 0x79, 0x30, 0x68, 0xE1, 0xED, 0x40, -0x69, 0xBF, 0x5B, 0x30, 0x6A, 0xC1, 0xCF, 0x40, 0x6B, 0xA8, 0x77, 0xB0, 0x6C, 0xA1, 0xB1, 0x40, -0x6D, 0x88, 0x59, 0xB0, 0x6E, 0x81, 0x93, 0x40, 0x6F, 0x68, 0x3B, 0xB0, 0x70, 0x6A, 0xAF, 0xC0, -0x71, 0x48, 0x1D, 0xB0, 0x72, 0x4A, 0x91, 0xC0, 0x73, 0x27, 0xFF, 0xB0, 0x74, 0x2A, 0x73, 0xC0, -0x75, 0x11, 0x1C, 0x30, 0x76, 0x0A, 0x55, 0xC0, 0x76, 0xF0, 0xFE, 0x30, 0x77, 0xEA, 0x37, 0xC0, -0x78, 0xD0, 0xE0, 0x30, 0x79, 0xCA, 0x19, 0xC0, 0x7A, 0xB0, 0xC2, 0x30, 0x7B, 0xB3, 0x36, 0x40, -0x7C, 0x90, 0xA4, 0x30, 0x7D, 0x93, 0x18, 0x40, 0x7E, 0x70, 0x86, 0x30, 0x7F, 0x72, 0xFA, 0x40, -0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x65, 0xFF, 0x97, 0x30, 0x67, 0x02, 0x0B, 0x40, 0x67, 0x0D, 0xDA, 0xB0, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, -0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, -0x04, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, -0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, -0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, -0x00, 0x2D, 0x30, 0x33, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x04, 0x02, 0x04, 0x03, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x04, +0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, +0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, +0x33, 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, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, -0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x11, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x17, 0xF5, -0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xDA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0xF0, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x97, 0xCA, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x78, 0xFE, -0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x93, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5A, 0x31, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x43, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x46, 0xC8, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x38, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xFC, -0x30, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x4C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x09, 0x2F, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x63, -0x30, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0xE8, -0x30, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAE, 0x1B, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x6C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8F, 0x4F, -0x30, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x82, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x53, 0x07, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x34, 0x3B, -0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x41, 0x3B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x6E, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0xBF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF6, 0xA2, -0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x48, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCF, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB9, 0x09, -0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0xAB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x70, 0x0C, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xDE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x4F, 0xEE, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6E, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x36, 0x68, -0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0F, 0xB2, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x37, 0x10, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xCF, -0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x16, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xE1, 0xEB, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xC1, 0xCD, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD6, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xA1, 0xAF, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xBF, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xB6, -0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x71, 0x90, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0x98, -0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x5A, 0xAD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x7A, -0x30, 0x00, 0x00, 0x00, 0x00, 0x41, 0x71, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x33, 0xAC, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x51, 0xD0, 0x40, 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, 0x1A, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x52, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x34, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xC1, 0x3B, -0x30, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xA1, 0x1D, -0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0xE1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x80, 0xFF, -0x30, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4E, 0x6C, -0x30, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2E, 0x4E, -0x30, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0xC2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0E, 0x30, -0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0xA4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x4C, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xF0, 0x86, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x2E, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xD0, 0x68, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x10, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB9, 0x84, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x96, 0xF2, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x99, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x76, 0xD4, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x79, 0x48, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xF1, -0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x59, 0x2A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xD3, -0x30, 0x00, 0x00, 0x00, 0x00, 0x63, 0x39, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0xB5, -0x30, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0xEE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFF, 0x97, -0x30, 0x00, 0x00, 0x00, 0x00, 0x67, 0x02, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0xDF, 0x79, -0x30, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBF, 0x5B, -0x30, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0xCF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x77, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0xB1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x59, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x81, 0x93, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x3B, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x48, 0x1D, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x4A, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x27, 0xFF, -0xB0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x2A, 0x73, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x1C, -0x30, 0x00, 0x00, 0x00, 0x00, 0x76, 0x0A, 0x55, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xFE, -0x30, 0x00, 0x00, 0x00, 0x00, 0x77, 0xEA, 0x37, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xE0, -0x30, 0x00, 0x00, 0x00, 0x00, 0x79, 0xCA, 0x19, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xC2, -0x30, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB3, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x90, 0xA4, -0x30, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x93, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x70, 0x86, -0x30, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xFA, 0x40, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, -0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, -0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, -0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, -0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, 0x00, 0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, -0x2D, 0x30, 0x34, 0x3E, 0x34, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, -0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0x62, -0xC6, 0x75, 0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, +0xFF, 0xFF, 0x69, 0x87, 0x11, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x17, 0xF5, 0x90, 0x00, 0x00, +0x00, 0x00, 0x05, 0x2B, 0xDA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0xF0, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x0A, 0xCF, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x97, 0xCA, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x0C, 0xB1, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x78, 0xFE, 0x30, 0x00, 0x00, +0x00, 0x00, 0x0E, 0x93, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5A, 0x31, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x10, 0x74, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x43, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x12, 0x55, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x46, 0xC8, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x14, 0x38, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xFC, 0x30, 0x00, 0x00, +0x00, 0x00, 0x16, 0x19, 0x4C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x09, 0x2F, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x17, 0xFA, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x63, 0x30, 0x00, 0x00, +0x00, 0x00, 0x19, 0xDB, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0xE8, 0x30, 0x00, 0x00, +0x00, 0x00, 0x1B, 0xBE, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAE, 0x1B, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x1D, 0x9F, 0x6C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8F, 0x4F, 0x30, 0x00, 0x00, +0x00, 0x00, 0x1F, 0x80, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x82, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x21, 0x61, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x53, 0x07, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x23, 0x44, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x34, 0x3B, 0x30, 0x00, 0x00, +0x00, 0x00, 0x25, 0x41, 0x3B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x6E, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x27, 0x06, 0xBF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF6, 0xA2, 0x30, 0x00, 0x00, +0x00, 0x00, 0x28, 0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x48, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x2A, 0xCF, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB9, 0x09, 0x30, 0x00, 0x00, +0x00, 0x00, 0x2C, 0xAB, 0xAB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x70, 0x0C, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x2E, 0x8C, 0xDE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x4F, 0xEE, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x30, 0x6E, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x36, 0x68, 0x30, 0x00, 0x00, +0x00, 0x00, 0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0F, 0xB2, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x34, 0x37, 0x10, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xCF, 0x30, 0x00, 0x00, +0x00, 0x00, 0x36, 0x16, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xE1, 0xEB, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xC1, 0xCD, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x39, 0xD6, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xA1, 0xAF, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x3B, 0xBF, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xB6, 0x30, 0x00, 0x00, +0x00, 0x00, 0x3D, 0x71, 0x90, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0x98, 0x30, 0x00, 0x00, +0x00, 0x00, 0x3F, 0x5A, 0xAD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x7A, 0x30, 0x00, 0x00, +0x00, 0x00, 0x41, 0x71, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x43, 0x51, 0xD0, 0x40, 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, 0x1A, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x52, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x34, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xC1, 0x3B, 0x30, 0x00, 0x00, +0x00, 0x00, 0x4C, 0xA7, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xA1, 0x1D, 0x30, 0x00, 0x00, +0x00, 0x00, 0x4E, 0x87, 0xE1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x80, 0xFF, 0x30, 0x00, 0x00, +0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4E, 0x6C, 0x30, 0x00, 0x00, +0x00, 0x00, 0x52, 0x50, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2E, 0x4E, 0x30, 0x00, 0x00, +0x00, 0x00, 0x54, 0x30, 0xC2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0E, 0x30, 0x30, 0x00, 0x00, +0x00, 0x00, 0x56, 0x10, 0xA4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x4C, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x57, 0xF0, 0x86, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x2E, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x59, 0xD0, 0x68, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x10, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x5B, 0xB9, 0x84, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x96, 0xF2, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x5D, 0x99, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x76, 0xD4, 0xB0, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x79, 0x48, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xF1, 0x30, 0x00, 0x00, +0x00, 0x00, 0x61, 0x59, 0x2A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xD3, 0x30, 0x00, 0x00, +0x00, 0x00, 0x63, 0x39, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0xB5, 0x30, 0x00, 0x00, +0x00, 0x00, 0x65, 0x18, 0xEE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFF, 0x97, 0x30, 0x00, 0x00, +0x00, 0x00, 0x67, 0x02, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0x0D, 0xDA, 0xB0, 0x01, 0x02, +0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, +0x04, 0x02, 0x04, 0x02, 0x04, 0x03, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, +0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0C, 0xFF, 0xFF, +0xD5, 0xD0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x2D, 0x30, 0x34, 0x00, +0x2D, 0x30, 0x33, 0x00, 0x0A, 0x3C, 0x2D, 0x30, 0x33, 0x3E, 0x33, 0x0A, 0x00, 0x62, 0xC6, 0x75, +0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00, /* America/Atikokan */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -45831,27 +45821,33 @@ const unsigned char timelib_timezone_db_data_builtin[711611] = { /* Asia/Manila */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x48, 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, 0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, -0xC1, 0x9C, 0xF4, 0x80, 0xC2, 0x16, 0x30, 0x70, 0xCB, 0xF2, 0xE7, 0x00, 0xD0, 0xA9, 0x25, 0x70, -0xE2, 0x6C, 0x39, 0x00, 0xE2, 0xD5, 0xA2, 0xF0, 0x0F, 0x75, 0x46, 0x80, 0x10, 0x66, 0x7A, 0xF0, -0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x1F, 0xF0, 0x00, 0x00, 0x00, -0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, -0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, -0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 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, 0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, -0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, -0x1F, 0x3F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, -0x16, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF2, 0xE7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, -0xA9, 0x25, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, -0xD5, 0xA2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x75, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, -0x66, 0x7A, 0xF0, 0x01, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0x1F, -0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, +0xC1, 0x9C, 0xF4, 0x80, 0xC2, 0x01, 0x18, 0x70, 0xCB, 0x3F, 0x9B, 0x00, 0xCB, 0x8C, 0x03, 0xF0, +0xD1, 0x4B, 0x4D, 0xF0, 0xD2, 0xB1, 0xE5, 0xF0, 0xE2, 0x6C, 0x39, 0x00, 0xE2, 0xB3, 0x5B, 0xF0, +0x0D, 0x9B, 0xFC, 0x00, 0x0E, 0x86, 0x98, 0xF0, 0x26, 0x56, 0xBF, 0x00, 0x26, 0xB1, 0xA8, 0x70, +0x03, 0x01, 0x02, 0x01, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x1F, +0xE8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, -0x00, 0x0A, 0x50, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x9F, 0x94, 0xDD, 0x01, 0xCB, 0x4A, 0x20, -0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 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, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, +0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0xBB, 0x7A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, +0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x01, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x3F, 0x9B, +0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x8C, 0x03, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x4B, 0x4D, +0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xB1, 0xE5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, +0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xB3, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x9B, 0xFC, +0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x86, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x56, 0xBF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xB1, 0xA8, 0x70, 0x01, 0x04, 0x02, 0x03, 0x02, 0x05, 0x02, +0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0x1F, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x71, +0x68, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, +0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, +0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, +0x50, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x9F, 0x96, 0x2A, 0x01, 0xCB, 0x3D, 0x89, 0x00, 0x00, +0x00, 0x00, /* Asia/Muscat */ 0x50, 0x48, 0x50, 0x32, 0x01, 0x4F, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -70848,4 +70844,4 @@ const unsigned char timelib_timezone_db_data_builtin[711611] = { }; #endif -const timelib_tzdb timezonedb_builtin = { "2024.2", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2025.1", 597, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; From 82d71a82aaa20b97581a82f9c8eae30ade7e5c05 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:31:51 +0100 Subject: [PATCH 28/54] Fix GH-17500: Segfault with requesting nodeName on nameless doctype Closes GH-17344. --- NEWS | 4 ++++ ext/dom/node.c | 8 +++++++- ext/dom/tests/gh17500.phpt | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ext/dom/tests/gh17500.phpt diff --git a/NEWS b/NEWS index 5de1b803299d1..0c67da4eba016 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,10 @@ PHP NEWS nielsdos) . Fixed potential OOB when checking for trailing spaces on Windows. (cmb) +- DOM: + . Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype). + (nielsdos) + - Enchant: . Fix crashes in enchant when passing null bytes. (nielsdos) diff --git a/ext/dom/node.c b/ext/dom/node.c index 07c6859d73017..588665830bf2e 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -98,11 +98,17 @@ int dom_node_node_name_read(dom_object *obj, zval *retval) } case XML_DOCUMENT_TYPE_NODE: case XML_DTD_NODE: + if (nodep->name) { + ZVAL_STRING(retval, (const char *) nodep->name); + } else { + ZVAL_EMPTY_STRING(retval); + } + break; case XML_PI_NODE: case XML_ENTITY_DECL: case XML_ENTITY_REF_NODE: case XML_NOTATION_NODE: - ZVAL_STRING(retval, (char *) nodep->name); + ZVAL_STRING(retval, (const char *) nodep->name); break; case XML_CDATA_SECTION_NODE: ZVAL_STRING(retval, "#cdata-section"); diff --git a/ext/dom/tests/gh17500.phpt b/ext/dom/tests/gh17500.phpt new file mode 100644 index 0000000000000..02082ed762980 --- /dev/null +++ b/ext/dom/tests/gh17500.phpt @@ -0,0 +1,14 @@ +--TEST-- +GH-17500 (Segfault with requesting nodeName on nameless doctype) +--EXTENSIONS-- +dom +--FILE-- +loadHTML("", LIBXML_NOERROR); +var_dump($doc->doctype->nodeName); + +?> +--EXPECT-- +string(0) "" From a1d1269688e8e493eb472d5b6d12b8f661f10686 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 16 Jan 2025 19:03:06 +0000 Subject: [PATCH 29/54] Fix GH-17469: UConverter::transcode() not hardcoding error handling. Respecting instead intl.use_exceptions/intl.error_level. close GH-17488 --- NEWS | 2 ++ ext/intl/converter/converter.c | 11 +++++++---- ext/intl/tests/gh17469.phpt | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 ext/intl/tests/gh17469.phpt diff --git a/NEWS b/NEWS index 0c67da4eba016..a7db6d9f3002d 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,8 @@ PHP NEWS - Intl: . Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos) + . Fixed bug GH-17469 (UConverter::transcode always emit E_WARNING on + invalid encoding). (David Carlier) - Opcache: . Fixed bug GH-17307 (Internal closure causes JIT failure). (nielsdos) diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index 6f65cfc2eea69..75fbfbc8e8861 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -381,20 +381,23 @@ static bool php_converter_set_encoding(php_converter_object *objval, if (objval) { THROW_UFAILURE(objval, "ucnv_open", error); } else { - php_error_docref(NULL, E_WARNING, "Error setting encoding: %d - %s", (int)error, u_errorName(error)); + char *msg; + spprintf(&msg, 0, "Error setting encoding: %d - %s", (int)error, u_errorName(error)); + intl_error_set(NULL, error, msg, 1); + efree(msg); } - return 0; + return false; } if (objval && !php_converter_set_callbacks(objval, cnv)) { - return 0; + return false; } if (*pcnv) { ucnv_close(*pcnv); } *pcnv = cnv; - return 1; + return true; } /* }}} */ diff --git a/ext/intl/tests/gh17469.phpt b/ext/intl/tests/gh17469.phpt new file mode 100644 index 0000000000000..a0c5d719817d7 --- /dev/null +++ b/ext/intl/tests/gh17469.phpt @@ -0,0 +1,34 @@ +--TEST-- +GH-17469: UConverter::transcode() raises always E_WARNING regardless of INI settings +--SKIPIF-- + +--FILE-- +getMessage(), PHP_EOL; +} +try { + UConverter::transcode("\x0a", 'UTF-16BE', 'da!'); +} catch (IntlException $e) { + echo $e->getMessage(), PHP_EOL; +} +?> +--EXPECTF-- + +Warning: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR in %s on line %d + +Warning: UConverter::transcode(): Error setting encoding: 4 - U_FILE_ACCESS_ERROR in %s on line 5 +Error setting encoding: 4 - U_FILE_ACCESS_ERROR +Error setting encoding: 4 - U_FILE_ACCESS_ERROR From eab209d81d1a8237a033d5981c5cc2f23b108e0d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 19 Jan 2025 11:33:41 +0100 Subject: [PATCH 30/54] Fix GH-17518: offset overflow phar extractTo() `search` can be the empty string, so we need to check the length before checking the last char. Closes GH-17519. --- NEWS | 3 +++ ext/phar/phar_object.c | 2 +- ext/phar/tests/gh17518.phpt | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ext/phar/tests/gh17518.phpt diff --git a/NEWS b/NEWS index a7db6d9f3002d..1ca375ce8bae3 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,9 @@ PHP NEWS - Opcache: . Fixed bug GH-17307 (Internal closure causes JIT failure). (nielsdos) +- Phar: + . Fixed bug GH-17518 (offset overflow phar extractTo()). (nielsdos) + - PHPDBG: . Fix crashes in function registration + test. (nielsdos, Girgias) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 98efcf701c6c4..39526ce4b235b 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -4306,7 +4306,7 @@ static int extract_helper(phar_archive_data *archive, zend_string *search, char if (FAILURE == phar_extract_file(overwrite, entry, pathto, pathto_len, error)) return -1; extracted++; } ZEND_HASH_FOREACH_END(); - } else if ('/' == ZSTR_VAL(search)[ZSTR_LEN(search) - 1]) { + } else if (ZSTR_LEN(search) > 0 && '/' == ZSTR_VAL(search)[ZSTR_LEN(search) - 1]) { /* ends in "/" -- extract all entries having that prefix */ ZEND_HASH_MAP_FOREACH_PTR(&archive->manifest, entry) { if (0 != strncmp(ZSTR_VAL(search), entry->filename, ZSTR_LEN(search))) continue; diff --git a/ext/phar/tests/gh17518.phpt b/ext/phar/tests/gh17518.phpt new file mode 100644 index 0000000000000..6a45e390edd0a --- /dev/null +++ b/ext/phar/tests/gh17518.phpt @@ -0,0 +1,23 @@ +--TEST-- +GH-17518 (offset overflow phar extractTo()) +--EXTENSIONS-- +phar +--INI-- +phar.readonly=0 +--FILE-- +extractTo(__DIR__ . '/gh17518', ''); +} catch (Throwable $e) { + echo $e::class, ": ", $e->getMessage(), "\n"; +} +?> +--CLEAN-- + +--EXPECTF-- +PharException: phar error: attempted to extract non-existent file or directory "" from phar "%sgh17518.phar.php" From 235d1b14a3fa317cd2837d16aae716b615bea40c Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 19 Jan 2025 20:36:12 +0100 Subject: [PATCH 31/54] Fix GH-17499: mysqli flaky test: ghsa-h35g-vwh6-m678-stmt-row-string --- ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt b/ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt index e40ed1d58c7ff..bd12aee3ed153 100644 --- a/ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt +++ b/ext/mysqli/tests/ghsa-h35g-vwh6-m678-stmt-row-string.phpt @@ -47,6 +47,6 @@ print "done!"; [*] Sending - Malicious Stmt Response for items [Extract heap through buffer over-read]: 01000001013000000203646566087068705f74657374056974656d73056974656d73046974656d046974656d0ce000c8000000fd011000000005000003fe00002200070000040000fa7465737405000005fe00002200 Warning: mysqli_result::fetch_assoc(): Malformed server packet. Field length pointing after the end of packet in %s on line %d -[*] Received: 0500000019010000000100000001 +[*] Received: 05000000190100000%d [*] Server finished done! From 5344bcca97bbf238fe7f4211537df258dbde794e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 20 Jan 2025 21:41:46 +0100 Subject: [PATCH 32/54] Fix GH-17408: Assertion failure Zend/zend_exceptions.c `zend_test_create_throwing_resource` sets the exception in the `test` call frame and unwinds to `main`. It then throws for the `resource` variable and verifies that the exception opline is set. However, it wasn't set in `main`, it was set at the `test` call frame and rethrown later. The assertion is too conservative, but the end result is right, so drop the assertion. Closes GH-17533. Co-authored-by: Ilija Tovilo --- NEWS | 2 ++ Zend/zend_exceptions.c | 1 - ext/zend_test/tests/gh17408.phpt | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ext/zend_test/tests/gh17408.phpt diff --git a/NEWS b/NEWS index 1ca375ce8bae3..9b1fc5f854180 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ PHP NEWS . Fixed NULL arithmetic during system program execution on Windows. (cmb, nielsdos) . Fixed potential OOB when checking for trailing spaces on Windows. (cmb) + . Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c). + (nielsdos, ilutov) - DOM: . Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype). diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 11b615c214a9f..a4e1c2f98c6ce 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -193,7 +193,6 @@ ZEND_API ZEND_COLD void zend_throw_exception_internal(zend_object *exception) /* zend_exception_set_previous(exception, EG(exception)); EG(exception) = exception; if (previous) { - ZEND_ASSERT(is_handle_exception_set() && "HANDLE_EXCEPTION not set?"); return; } } diff --git a/ext/zend_test/tests/gh17408.phpt b/ext/zend_test/tests/gh17408.phpt new file mode 100644 index 0000000000000..f54a7b81fce9c --- /dev/null +++ b/ext/zend_test/tests/gh17408.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-17408 (Assertion failure Zend/zend_exceptions.c) +--EXTENSIONS-- +zend_test +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Exception: Throwing resource destructor called in %s:%d +Stack trace: +#0 %s(%d): test() +#1 {main} + +Next Exception: Throwing resource destructor called in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d From 0b3e637aec21dabbc797f89c6b68e5bc208f0743 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 21 Jan 2025 08:36:20 +0100 Subject: [PATCH 33/54] Fix may_have_extra_named_args flag for ZEND_AST_UNPACK The check for `!fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC)` is performed after `fbc` is set to NULL, so this always returns true. This results in `ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS` always being set for unpack sends. Fix it by moving the flag updates to the point before setting `fbc` to NULL. Closes GH-17534. --- NEWS | 1 + Zend/zend_compile.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 9b1fc5f854180..6744e7ed5b865 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ PHP NEWS . Fixed potential OOB when checking for trailing spaces on Windows. (cmb) . Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c). (nielsdos, ilutov) + . Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos) - DOM: . Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype). diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index a78523d493f71..dbd8c9dc17fd7 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3661,6 +3661,12 @@ static uint32_t zend_compile_args( "Cannot use argument unpacking after named arguments"); } + /* Unpack may contain named arguments. */ + may_have_undef = 1; + if (!fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC)) { + *may_have_extra_named_args = 1; + } + uses_arg_unpack = 1; fbc = NULL; @@ -3669,11 +3675,6 @@ static uint32_t zend_compile_args( opline->op2.num = arg_count; opline->result.var = EX_NUM_TO_VAR(arg_count - 1); - /* Unpack may contain named arguments. */ - may_have_undef = 1; - if (!fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC)) { - *may_have_extra_named_args = 1; - } continue; } From 2a2cc2ccce3855f6244b7ea3449282e24cc2cf06 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 22 Jan 2025 22:38:02 +0100 Subject: [PATCH 34/54] Fix type confusion with session SID constant Closes GH-17548. --- NEWS | 3 +++ ext/session/session.c | 4 ++-- ext/session/tests/SID_type_confusion.phpt | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 ext/session/tests/SID_type_confusion.phpt diff --git a/NEWS b/NEWS index 6744e7ed5b865..9c75b031eb19e 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,9 @@ PHP NEWS - PHPDBG: . Fix crashes in function registration + test. (nielsdos, Girgias) +- Session: + . Fix type confusion with session SID constant. (nielsdos) + - SimpleXML: . Fixed bug GH-17409 (Assertion failure Zend/zend_hash.c:1730). (nielsdos) diff --git a/ext/session/session.c b/ext/session/session.c index b838b132b16d0..b261f9a35594a 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1479,7 +1479,7 @@ PHPAPI zend_result php_session_reset_id(void) /* {{{ */ smart_str_appends(&var, ZSTR_VAL(PS(id))); smart_str_0(&var); if (sid) { - zval_ptr_dtor_str(sid); + zval_ptr_dtor(sid); ZVAL_STR(sid, smart_str_extract(&var)); } else { REGISTER_STRINGL_CONSTANT("SID", ZSTR_VAL(var.s), ZSTR_LEN(var.s), 0); @@ -1487,7 +1487,7 @@ PHPAPI zend_result php_session_reset_id(void) /* {{{ */ } } else { if (sid) { - zval_ptr_dtor_str(sid); + zval_ptr_dtor(sid); ZVAL_EMPTY_STRING(sid); } else { REGISTER_STRINGL_CONSTANT("SID", "", 0, 0); diff --git a/ext/session/tests/SID_type_confusion.phpt b/ext/session/tests/SID_type_confusion.phpt new file mode 100644 index 0000000000000..837f0784d40ef --- /dev/null +++ b/ext/session/tests/SID_type_confusion.phpt @@ -0,0 +1,19 @@ +--TEST-- +SID constant type confusion +--EXTENSIONS-- +session +--SKIPIF-- + +--INI-- +session.use_cookies=0 +session.use_only_cookies=1 +--FILE-- + +--EXPECT-- +string(0) "" From f26250c7c78aba959e57d5ac5b1aa388d5685f64 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 24 Jan 2025 12:24:18 +0100 Subject: [PATCH 35/54] Backport nightly.yml This file should stay up-to-date for consistent behavior across workflow triggers. --- .github/workflows/nightly.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 90e9a1d7b760c..4041271f4d041 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -227,6 +227,8 @@ jobs: runs-on: ubuntu-latest container: image: ubuntu:${{ inputs.ubuntu_version }} + env: + PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb services: mysql: image: mysql:8.3 @@ -235,6 +237,15 @@ jobs: env: MYSQL_DATABASE: test MYSQL_ROOT_PASSWORD: root + firebird: + image: jacobalberty/firebird + ports: + - 3050:3050 + env: + ISC_PASSWORD: test + FIREBIRD_DATABASE: test.fdb + FIREBIRD_USER: test + FIREBIRD_PASSWORD: test steps: - name: git checkout uses: actions/checkout@v4 @@ -952,10 +963,18 @@ jobs: - x64: true zts: true opcache: true + asan: false - x64: false zts: false opcache: false - name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" + asan: false + - x64: true + zts: true + opcache: true + asan: true + branch: 'master' + timeout: 120 + name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}" runs-on: windows-${{ inputs.windows_version }} env: PHP_BUILD_CACHE_BASE_DIR: C:\build-cache @@ -968,6 +987,7 @@ jobs: INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}" PARALLEL: -j2 OPCACHE: "${{ matrix.opcache && '1' || '0' }}" + ASAN: "${{ matrix.asan && '1' || '0' }}" steps: - name: git config run: git config --global core.autocrlf false && git config --global core.eol lf From 5b8c960c9feb0db240da8818d901a11bdaceba0e Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 24 Jan 2025 12:40:36 +0100 Subject: [PATCH 36/54] Skip Symfony/Wordpress in 8.1 build There are two issues: The latest Symfony branches don't support 8.1 anymore. This could ber mitigated by switching to LTS for security builds. However, there are also some JIT bugs that are hard to backport. We'll skip these builds on 8.1 instead. --- .github/workflows/nightly.yml | 12 +++++++++--- .github/workflows/root.yml | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4041271f4d041..fba5b095f83d1 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -26,6 +26,12 @@ on: windows_version: required: true type: string + skip_symfony: + required: true + type: boolean + skip_wordpress: + required: true + type: boolean permissions: contents: read jobs: @@ -554,7 +560,7 @@ jobs: exit 1 fi - name: Test Symfony - if: always() + if: always() && !inputs.skip_symfony run: | git clone https://github.com/symfony/symfony.git --depth=1 cd symfony @@ -586,7 +592,7 @@ jobs: exit 1 fi - name: 'Symfony Preloading' - if: always() + if: always() && !inputs.skip_symfony run: | php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs cd symfony_demo @@ -594,7 +600,7 @@ jobs: sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php - name: Test Wordpress - if: always() + if: always() && !inputs.skip_wordpress run: | git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1 cd wordpress diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml index cefabd0394a46..5cdd70489343f 100644 --- a/.github/workflows/root.yml +++ b/.github/workflows/root.yml @@ -59,4 +59,6 @@ jobs: || ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) && '22.04') || '20.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 }} secrets: inherit From 5b32011fb5651bbad42572c7ceacdd85e65f4726 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 24 Jan 2025 14:25:24 +0100 Subject: [PATCH 37/54] [skip ci] Use !cancelled() over always() in GHA config According to the documentation, !cancelled() should be used over always() when the step should be executed regardless of success of failure, but canceled when the workflow is canceled. See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#always --- .github/workflows/nightly.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index fba5b095f83d1..c2816d72cf18e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -427,7 +427,7 @@ jobs: -d zend_extension=opcache.so -d opcache.enable_cli=1 - uses: codecov/codecov-action@v4 - if: always() + if: !cancelled() with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} @@ -500,7 +500,7 @@ jobs: echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini php -v - name: Test AMPHP - if: always() + if: !cancelled() run: | repositories="amp cache dns file http parallel parser pipeline process serialization socket sync websocket-client websocket-server" X=0 @@ -518,7 +518,7 @@ jobs: done exit $X - name: Test Laravel - if: always() + if: !cancelled() run: | git clone https://github.com/laravel/framework.git --branch=master --depth=1 cd framework @@ -531,7 +531,7 @@ jobs: exit 1 fi - name: Test ReactPHP - if: always() + if: !cancelled() run: | repositories="async cache child-process datagram dns event-loop promise promise-stream promise-timer stream" X=0 @@ -549,7 +549,7 @@ jobs: done exit $X - name: Test Revolt PHP - if: always() + if: !cancelled() run: | git clone https://github.com/revoltphp/event-loop.git --depth=1 cd event-loop @@ -560,7 +560,7 @@ jobs: exit 1 fi - name: Test Symfony - if: always() && !inputs.skip_symfony + if: !cancelled() && !inputs.skip_symfony run: | git clone https://github.com/symfony/symfony.git --depth=1 cd symfony @@ -581,7 +581,7 @@ jobs: done exit $X - name: Test PHPUnit - if: always() + if: !cancelled() run: | git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1 cd phpunit @@ -592,7 +592,7 @@ jobs: exit 1 fi - name: 'Symfony Preloading' - if: always() && !inputs.skip_symfony + if: !cancelled() && !inputs.skip_symfony run: | php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs cd symfony_demo @@ -600,7 +600,7 @@ jobs: sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php - name: Test Wordpress - if: always() && !inputs.skip_wordpress + if: !cancelled() && !inputs.skip_wordpress run: | git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1 cd wordpress From a85666c17b4cfd68a8f782bbab606ee97aeb9b52 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Wed, 22 Jan 2025 17:27:59 +0000 Subject: [PATCH 38/54] ext/session: Fix GH-17541 (ext/session NULL pointer dereferencement during ID reset) Closes GH-17541 Closes GH-17546 --- NEWS | 2 ++ ext/session/session.c | 21 +++++++++------- ext/session/tests/bug66481.phpt | 2 +- ext/session/tests/gh17541.phpt | 24 +++++++++++++++++++ .../tests/session_name_variation1.phpt | 20 ++++++++-------- 5 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 ext/session/tests/gh17541.phpt diff --git a/NEWS b/NEWS index 9c75b031eb19e..1084d620deb9a 100644 --- a/NEWS +++ b/NEWS @@ -50,6 +50,8 @@ PHP NEWS - Session: . Fix type confusion with session SID constant. (nielsdos) + . Fixed bug GH-17541 (ext/session NULL pointer dereferencement during + ID reset). (Girgias) - SimpleXML: . Fixed bug GH-17409 (Assertion failure Zend/zend_hash.c:1730). (nielsdos) diff --git a/ext/session/session.c b/ext/session/session.c index b261f9a35594a..ccf01d093b653 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -94,6 +94,7 @@ zend_class_entry *php_session_update_timestamp_iface_entry; } #define SESSION_FORBIDDEN_CHARS "=,;.[ \t\r\n\013\014" +#define SESSION_FORBIDDEN_CHARS_FOR_ERROR_MSG "=,;.[ \\t\\r\\n\\013\\014" #define APPLY_TRANS_SID (PS(use_trans_sid) && !PS(use_only_cookies)) @@ -683,7 +684,12 @@ static PHP_INI_MH(OnUpdateName) /* {{{ */ SESSION_CHECK_OUTPUT_STATE; /* Numeric session.name won't work at all */ - if ((!ZSTR_LEN(new_value) || is_numeric_string(ZSTR_VAL(new_value), ZSTR_LEN(new_value), NULL, NULL, 0))) { + if ( + ZSTR_LEN(new_value) == 0 + || zend_str_has_nul_byte(new_value) + || is_numeric_str_function(new_value, NULL, NULL) + || strpbrk(ZSTR_VAL(new_value), SESSION_FORBIDDEN_CHARS) != NULL + ) { int err_type; if (stage == ZEND_INI_STAGE_RUNTIME || stage == ZEND_INI_STAGE_ACTIVATE || stage == ZEND_INI_STAGE_STARTUP) { @@ -694,7 +700,7 @@ static PHP_INI_MH(OnUpdateName) /* {{{ */ /* Do not output error when restoring ini options. */ if (stage != ZEND_INI_STAGE_DEACTIVATE) { - php_error_docref(NULL, err_type, "session.name \"%s\" cannot be numeric or empty", ZSTR_VAL(new_value)); + php_error_docref(NULL, err_type, "session.name \"%s\" must not be numeric, empty, contain null bytes or any of the following characters \"" SESSION_FORBIDDEN_CHARS_FOR_ERROR_MSG "\"", ZSTR_VAL(new_value)); } return FAILURE; } @@ -1338,11 +1344,7 @@ static zend_result php_session_send_cookie(void) /* {{{ */ return FAILURE; } - /* Prevent broken Set-Cookie header, because the session_name might be user supplied */ - if (strpbrk(PS(session_name), SESSION_FORBIDDEN_CHARS) != NULL) { /* man isspace for \013 and \014 */ - php_error_docref(NULL, E_WARNING, "session.name cannot contain any of the following '=,;.[ \\t\\r\\n\\013\\014'"); - return FAILURE; - } + ZEND_ASSERT(strpbrk(PS(session_name), SESSION_FORBIDDEN_CHARS) == NULL); /* URL encode id because it might be user supplied */ e_id = php_url_encode(ZSTR_VAL(PS(id)), ZSTR_LEN(PS(id))); @@ -1462,7 +1464,10 @@ PHPAPI zend_result php_session_reset_id(void) /* {{{ */ } if (PS(use_cookies) && PS(send_cookie)) { - php_session_send_cookie(); + zend_result cookies_sent = php_session_send_cookie(); + if (UNEXPECTED(cookies_sent == FAILURE)) { + return FAILURE; + } PS(send_cookie) = 0; } diff --git a/ext/session/tests/bug66481.phpt b/ext/session/tests/bug66481.phpt index 88c2e48ed7999..26a31279fbed2 100644 --- a/ext/session/tests/bug66481.phpt +++ b/ext/session/tests/bug66481.phpt @@ -15,6 +15,6 @@ var_dump(session_name("foo")); var_dump(session_name("bar")); ?> --EXPECT-- -Warning: PHP Startup: session.name "" cannot be numeric or empty in Unknown on line 0 +Warning: PHP Startup: session.name "" must not be numeric, empty, contain null bytes or any of the following characters "=,;.[ \t\r\n\013\014" in Unknown on line 0 string(9) "PHPSESSID" string(3) "foo" diff --git a/ext/session/tests/gh17541.phpt b/ext/session/tests/gh17541.phpt new file mode 100644 index 0000000000000..bbf6a50393b5e --- /dev/null +++ b/ext/session/tests/gh17541.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-17541 (ext/session NULL pointer dereferencement during ID reset) +--EXTENSIONS-- +session +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d +string(9) "PHPSESSID" +bool(true) diff --git a/ext/session/tests/session_name_variation1.phpt b/ext/session/tests/session_name_variation1.phpt index 07fb7f10ca89b..a298e643c0490 100644 --- a/ext/session/tests/session_name_variation1.phpt +++ b/ext/session/tests/session_name_variation1.phpt @@ -38,25 +38,25 @@ ob_end_flush(); ?> --EXPECTF-- *** Testing session_name() : variation *** + +Warning: session_name(): session.name "" must not be numeric, empty, contain null bytes or any of the following characters "=,;.[ \t\r\n\013\014" in %s on line %d string(9) "PHPSESSID" bool(true) string(9) "PHPSESSID" bool(true) string(9) "PHPSESSID" -string(9) "PHPSESSID" -Warning: session_start(): session.name cannot contain any of the following '=,;.[ \t\r\n\013\014' in %s on line %d +Warning: session_name(): session.name " " must not be numeric, empty, contain null bytes or any of the following characters "=,;.[ \t\r\n\013\014" in %s on line %d +string(9) "PHPSESSID" bool(true) -string(1) " " +string(9) "PHPSESSID" bool(true) -string(1) " " - -Warning: session_name(): session.name "" cannot be numeric or empty in %s on line %d -string(1) " " +string(9) "PHPSESSID" -Warning: session_start(): session.name cannot contain any of the following '=,;.[ \t\r\n\013\014' in %s on line %d +Warning: session_name(): session.name "" must not be numeric, empty, contain null bytes or any of the following characters "=,;.[ \t\r\n\013\014" in %s on line %d +string(9) "PHPSESSID" bool(true) -string(1) " " +string(9) "PHPSESSID" bool(true) -string(1) " " +string(9) "PHPSESSID" Done From 3e6f4702ba2a1e58561b62263a63436d59a4a463 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 24 Jan 2025 15:43:22 +0100 Subject: [PATCH 39/54] Fix GHA config yml error --- .github/workflows/nightly.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c2816d72cf18e..4c8ec23b158a4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -427,7 +427,7 @@ jobs: -d zend_extension=opcache.so -d opcache.enable_cli=1 - uses: codecov/codecov-action@v4 - if: !cancelled() + if: ${{ !cancelled() }} with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} @@ -500,7 +500,7 @@ jobs: echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini php -v - name: Test AMPHP - if: !cancelled() + if: ${{ !cancelled() }} run: | repositories="amp cache dns file http parallel parser pipeline process serialization socket sync websocket-client websocket-server" X=0 @@ -518,7 +518,7 @@ jobs: done exit $X - name: Test Laravel - if: !cancelled() + if: ${{ !cancelled() }} run: | git clone https://github.com/laravel/framework.git --branch=master --depth=1 cd framework @@ -531,7 +531,7 @@ jobs: exit 1 fi - name: Test ReactPHP - if: !cancelled() + if: ${{ !cancelled() }} run: | repositories="async cache child-process datagram dns event-loop promise promise-stream promise-timer stream" X=0 @@ -549,7 +549,7 @@ jobs: done exit $X - name: Test Revolt PHP - if: !cancelled() + if: ${{ !cancelled() }} run: | git clone https://github.com/revoltphp/event-loop.git --depth=1 cd event-loop @@ -560,7 +560,7 @@ jobs: exit 1 fi - name: Test Symfony - if: !cancelled() && !inputs.skip_symfony + if: ${{ !cancelled() && !inputs.skip_symfony }} run: | git clone https://github.com/symfony/symfony.git --depth=1 cd symfony @@ -581,7 +581,7 @@ jobs: done exit $X - name: Test PHPUnit - if: !cancelled() + if: ${{ !cancelled() }} run: | git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1 cd phpunit @@ -592,7 +592,7 @@ jobs: exit 1 fi - name: 'Symfony Preloading' - if: !cancelled() && !inputs.skip_symfony + if: ${{ !cancelled() && !inputs.skip_symfony }} run: | php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs cd symfony_demo @@ -600,7 +600,7 @@ jobs: sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php - name: Test Wordpress - if: !cancelled() && !inputs.skip_wordpress + if: ${{ !cancelled() && !inputs.skip_wordpress }} run: | git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1 cd wordpress From 99f8ec33d9713e43c27681c37a7618db10b7c066 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 21 Jan 2025 15:36:47 +0000 Subject: [PATCH 40/54] ext/pdo: Fix memory leak if GC needs to free PDO Statement --- ext/pdo/pdo_stmt.c | 7 +- ext/pdo/tests/pdo_stmt_cyclic_references.phpt | 132 ++++++++++++++++++ 2 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 ext/pdo/tests/pdo_stmt_cyclic_references.phpt diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index a7d898221f881..d17a40dbc242e 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2079,8 +2079,11 @@ static zend_function *dbstmt_method_get(zend_object **object_pp, zend_string *me static HashTable *dbstmt_get_gc(zend_object *object, zval **gc_data, int *gc_count) { pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object); - *gc_data = &stmt->fetch.into; - *gc_count = 1; + + zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create(); + zend_get_gc_buffer_add_zval(gc_buffer, &stmt->database_object_handle); + zend_get_gc_buffer_add_zval(gc_buffer, &stmt->fetch.into); + zend_get_gc_buffer_use(gc_buffer, gc_data, gc_count); /** * If there are no dynamic properties and the default property is 1 (that is, there is only one property diff --git a/ext/pdo/tests/pdo_stmt_cyclic_references.phpt b/ext/pdo/tests/pdo_stmt_cyclic_references.phpt new file mode 100644 index 0000000000000..01df6e0b46d60 --- /dev/null +++ b/ext/pdo/tests/pdo_stmt_cyclic_references.phpt @@ -0,0 +1,132 @@ +--TEST-- +PDO Common: Cyclic PDOStatement child class +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +exec('CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO test VALUES(1, 'A', 'AA')"); +$db->exec("INSERT INTO test VALUES(2, 'B', 'BB')"); +$db->exec("INSERT INTO test VALUES(3, 'C', 'CC')"); + +$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, ['CyclicStatement', [new Ref]]); + +echo "Column fetch:\n"; +$stmt = $db->query('SELECT id, val2, val FROM test'); +$stmt->ref->stmt = $stmt; +$stmt->setFetchMode(PDO::FETCH_COLUMN, 2); +foreach($stmt as $obj) { + var_dump($obj); +} + +echo "Class fetch:\n"; +$stmt = $db->query('SELECT id, val2, val FROM test'); +$stmt->ref->stmt = $stmt; +$stmt->setFetchMode(PDO::FETCH_CLASS, 'TestRow', ['Hello world']); +foreach($stmt as $obj) { + var_dump($obj); +} + +echo "Fetch into:\n"; +$stmt = $db->query('SELECT id, val2, val FROM test'); +$stmt->ref->stmt = $stmt; +$stmt->setFetchMode(PDO::FETCH_INTO, new TestRow('I am being fetch into')); +foreach($stmt as $obj) { + var_dump($obj); +} + +?> +--EXPECTF-- +Column fetch: +string(1) "A" +string(1) "B" +string(1) "C" +Class fetch: +object(TestRow)#%d (4) { + ["id"]=> + string(1) "1" + ["val"]=> + string(1) "A" + ["val2"]=> + string(2) "AA" + ["arg"]=> + string(11) "Hello world" +} +object(TestRow)#%d (4) { + ["id"]=> + string(1) "2" + ["val"]=> + string(1) "B" + ["val2"]=> + string(2) "BB" + ["arg"]=> + string(11) "Hello world" +} +object(TestRow)#%d (4) { + ["id"]=> + string(1) "3" + ["val"]=> + string(1) "C" + ["val2"]=> + string(2) "CC" + ["arg"]=> + string(11) "Hello world" +} +Fetch into: +object(TestRow)#4 (4) { + ["id"]=> + string(1) "1" + ["val"]=> + string(1) "A" + ["val2"]=> + string(2) "AA" + ["arg"]=> + string(21) "I am being fetch into" +} +object(TestRow)#4 (4) { + ["id"]=> + string(1) "2" + ["val"]=> + string(1) "B" + ["val2"]=> + string(2) "BB" + ["arg"]=> + string(21) "I am being fetch into" +} +object(TestRow)#4 (4) { + ["id"]=> + string(1) "3" + ["val"]=> + string(1) "C" + ["val2"]=> + string(2) "CC" + ["arg"]=> + string(21) "I am being fetch into" +} From 2ae897fff7af3a794a31a8aeeeeb4f21f6a41393 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:19:42 +0100 Subject: [PATCH 41/54] Fix crash in firebird statement dtor If both the driver object and statement end up in the GC buffer and are freed by the GC, then the destruction order is not deterministic and it is possible that the driver object is freed before the statement. In that case, accessing S->H will cause a UAF. As the resources are already released we simply skip the destruction if the driver object is already destroyed. --- ext/pdo_firebird/firebird_statement.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 1fe894cd631df..7f4e7aeed87c0 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -87,8 +87,15 @@ static int firebird_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */ pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data; int result = 1; - /* release the statement */ - if (isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_drop)) { + /* TODO: for master, move this check to a separate function shared between pdo drivers. + * pdo_pgsql and pdo_mysql do this exact same thing */ + bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle) + && IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)]) + && !(OBJ_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED); + + /* release the statement. + * Note: if the server object is already gone then the statement was closed already as well. */ + if (server_obj_usable && isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_drop)) { RECORD_ERROR(stmt); result = 0; } From e6d917e4c9822c221cac9ed1c3c22aace2387f8a Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Fri, 24 Jan 2025 20:14:23 +0000 Subject: [PATCH 42/54] Add NEWS entries Closes GH-17539 --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 1084d620deb9a..c4fd35de80641 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,10 @@ PHP NEWS - Opcache: . Fixed bug GH-17307 (Internal closure causes JIT failure). (nielsdos) +- PDO: + . Fixed a memory leak when the GC is used to free a PDOStatment. (Girgias) + . Fixed a crash in the PDO Firebird Statement destructor. (nielsdos) + - Phar: . Fixed bug GH-17518 (offset overflow phar extractTo()). (nielsdos) From a403b76e8819784cc7a7597d04af171793b26e7a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 25 Jan 2025 01:44:51 +0100 Subject: [PATCH 43/54] Use preinstalled MySQL for Windows CI Recent hosted GH Windows runners already have MySQL preinstalled, so there is no particular need to install it again via Chocolatey or other means. If we ever need to address more specific needs, we may want to have a look at . Closes GH-17561. Closes GH-17570. --- .github/actions/setup-windows/action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml index 4786242455a1a..e0a3fd4e7d316 100644 --- a/.github/actions/setup-windows/action.yml +++ b/.github/actions/setup-windows/action.yml @@ -3,10 +3,12 @@ runs: using: composite steps: - name: Setup MySQL - shell: pwsh + shell: cmd run: | - choco install mysql -y --no-progress --params="/port:3306" - mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;" + mysqld --initialize-insecure + mysqld --install + net start MySQL + mysql --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;" - name: Setup MSSQL shell: pwsh run: | From 2e02cdfb5fb37731530f12e5f4cbe5975d3506cf Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 23 Jan 2025 16:29:35 +0100 Subject: [PATCH 44/54] Fix NULL arithmetic in System V shared memory emulation For the first child process execution, `TWG(shm)` is `NULL`; we need to catch that to avoid undefined behavior. Closes GH-17550. --- NEWS | 2 ++ TSRM/tsrm_win32.c | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index c4fd35de80641..fdf7e1a27587a 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ PHP NEWS . Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c). (nielsdos, ilutov) . Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos) + . Fix NULL arithmetic in System V shared memory emulation for Windows. (cmb) + - DOM: . Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype). diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index da0ca7f005f58..4550715d5ce71 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -402,19 +402,21 @@ static shm_pair *shm_get(key_t key, void *addr) shm_pair *ptr; shm_pair *newptr; - for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) { - if (!ptr->descriptor) { - continue; - } - if (!addr && ptr->descriptor->shm_perm.key == key) { - break; - } else if (ptr->addr == addr) { - break; + if (TWG(shm) != NULL) { + for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) { + if (!ptr->descriptor) { + continue; + } + if (!addr && ptr->descriptor->shm_perm.key == key) { + break; + } else if (ptr->addr == addr) { + break; + } } - } - if (ptr < (TWG(shm) + TWG(shm_size))) { - return ptr; + if (ptr < (TWG(shm) + TWG(shm_size))) { + return ptr; + } } newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair)); From 3027600ffcf97c7b6e231fffff7165a63f997d86 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Sun, 26 Jan 2025 05:20:07 +0000 Subject: [PATCH 45/54] ext/pdo: Fix a UAF when changing default fetch class ctor args Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com> --- NEWS | 1 + ext/pdo/pdo_stmt.c | 20 ++++- ..._class_change_ctor_args_during_fetch1.phpt | 54 +++++++++++++ ..._class_change_ctor_args_during_fetch2.phpt | 53 ++++++++++++ ..._class_change_ctor_args_during_fetch3.phpt | 81 +++++++++++++++++++ ..._class_change_ctor_args_during_fetch4.phpt | 80 ++++++++++++++++++ ..._class_change_ctor_args_during_fetch5.phpt | 50 ++++++++++++ .../tests/pdo_fetch_class_cyclic_ctor.phpt | 54 +++++++++++++ 8 files changed, 392 insertions(+), 1 deletion(-) create mode 100644 ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch1.phpt create mode 100644 ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch2.phpt create mode 100644 ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch3.phpt create mode 100644 ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch4.phpt create mode 100644 ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch5.phpt create mode 100644 ext/pdo/tests/pdo_fetch_class_cyclic_ctor.phpt diff --git a/NEWS b/NEWS index fdf7e1a27587a..28b9116fc47a8 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,7 @@ PHP NEWS - PDO: . Fixed a memory leak when the GC is used to free a PDOStatment. (Girgias) . Fixed a crash in the PDO Firebird Statement destructor. (nielsdos) + . Fixed UAFs when changing default fetch class ctor args. (Girgias, nielsdos) - Phar: . Fixed bug GH-17518 (offset overflow phar extractTo()). (nielsdos) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index d17a40dbc242e..3998b64ab7e13 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1252,6 +1252,7 @@ PHP_METHOD(PDOStatement, fetchAll) zval *arg2 = NULL; zend_class_entry *old_ce; zval old_ctor_args, *ctor_args = NULL; + HashTable *current_ctor = NULL; bool error = false; int flags, old_arg_count; @@ -1269,6 +1270,10 @@ PHP_METHOD(PDOStatement, fetchAll) old_ce = stmt->fetch.cls.ce; ZVAL_COPY_VALUE(&old_ctor_args, &stmt->fetch.cls.ctor_args); + if (Z_TYPE(old_ctor_args) == IS_ARRAY) { + /* Protect against destruction by marking this as immutable: we consider this non-owned temporarily */ + Z_TYPE_INFO(stmt->fetch.cls.ctor_args) = IS_ARRAY; + } old_arg_count = stmt->fetch.cls.fci.param_count; do_fetch_opt_finish(stmt, 0); @@ -1293,7 +1298,13 @@ PHP_METHOD(PDOStatement, fetchAll) } if (ctor_args && zend_hash_num_elements(Z_ARRVAL_P(ctor_args)) > 0) { - ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, ctor_args); /* we're not going to free these */ + /* We increase the refcount and store it in case usercode has been messing around with the ctor args. + * We need to store current_ctor separately as usercode may change the ctor_args which will cause a leak. */ + current_ctor = Z_ARRVAL_P(ctor_args); + ZVAL_COPY(&stmt->fetch.cls.ctor_args, ctor_args); + /* Protect against destruction by marking this as immutable: we consider this non-owned + * as destruction is handled via current_ctor. */ + Z_TYPE_INFO(stmt->fetch.cls.ctor_args) = IS_ARRAY; } else { ZVAL_UNDEF(&stmt->fetch.cls.ctor_args); } @@ -1365,6 +1376,7 @@ PHP_METHOD(PDOStatement, fetchAll) } PDO_STMT_CLEAR_ERR(); + if ((how & PDO_FETCH_GROUP) || how == PDO_FETCH_KEY_PAIR || (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR) ) { @@ -1389,9 +1401,15 @@ PHP_METHOD(PDOStatement, fetchAll) } do_fetch_opt_finish(stmt, 0); + if (current_ctor) { + zend_array_release(current_ctor); + } /* Restore defaults which were changed by PDO_FETCH_CLASS mode */ stmt->fetch.cls.ce = old_ce; + /* ctor_args may have been changed to an owned object in the meantime, so destroy it. + * If it was not, then the type flags update will have protected us against destruction. */ + zval_ptr_dtor(&stmt->fetch.cls.ctor_args); ZVAL_COPY_VALUE(&stmt->fetch.cls.ctor_args, &old_ctor_args); stmt->fetch.cls.fci.param_count = old_arg_count; diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch1.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch1.phpt new file mode 100644 index 0000000000000..bd2ee2aa86452 --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch1.phpt @@ -0,0 +1,54 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetch() +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setFetchMode(PDO::FETCH_CLASS, 'Test', [$this->val2]); + } + } +} + +// TODO Rename test table to pdo_fetch_class_change_ctor_one in PHP-8.4 +$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO test VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO test VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO test VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO test VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM test'); +$stmt->setFetchMode(PDO::FETCH_CLASS, 'Test', [$stmt]); + +$stmt->execute(); +var_dump($stmt->fetch()); + +?> +--EXPECTF-- +object(PDOStatement)#%d (1) { + ["queryString"]=> + string(27) "SELECT val1, val2 FROM test" +} +object(Test)#%d (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" +} diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch2.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch2.phpt new file mode 100644 index 0000000000000..f2ffc29dc8afd --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch2.phpt @@ -0,0 +1,53 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetchObject() +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setFetchMode(PDO::FETCH_CLASS, 'Test', [$this->val2]); + } + } +} + +// TODO Rename test table to pdo_fetch_class_change_ctor_two in PHP-8.4 +$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO test VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO test VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO test VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO test VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM test'); + +$stmt->execute(); +var_dump($stmt->fetchObject('Test', [$stmt])); + +?> +--EXPECTF-- +object(PDOStatement)#%s (1) { + ["queryString"]=> + string(27) "SELECT val1, val2 FROM test" +} +object(Test)#%s (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" +} diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch3.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch3.phpt new file mode 100644 index 0000000000000..3972ca870a743 --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch3.phpt @@ -0,0 +1,81 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetchAll() (no args variation) +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setFetchMode(PDO::FETCH_CLASS, 'Test', [$this->val2]); + } + } +} + +// TODO Rename test table to pdo_fetch_class_change_ctor_three in PHP-8.4 +$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO test VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO test VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO test VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO test VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM test'); +$stmt->setFetchMode(PDO::FETCH_CLASS, 'Test', [$stmt]); + +$stmt->execute(); +var_dump($stmt->fetchAll()); + +?> +--EXPECTF-- +object(PDOStatement)#%d (1) { + ["queryString"]=> + string(27) "SELECT val1, val2 FROM test" +} +string(5) "alpha" +string(5) "alpha" +string(5) "alpha" +array(4) { + [0]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" + } + [1]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "B" + ["val2"]=> + string(4) "beta" + } + [2]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "C" + ["val2"]=> + string(5) "gamma" + } + [3]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "D" + ["val2"]=> + string(5) "delta" + } +} diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch4.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch4.phpt new file mode 100644 index 0000000000000..cab4b159c3d50 --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch4.phpt @@ -0,0 +1,80 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetchAll() (args in fetchAll) +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setFetchMode(PDO::FETCH_CLASS, 'Test', [$this->val2]); + } + } +} + +// TODO Rename test table to pdo_fetch_class_change_ctor_four in PHP-8.4 +$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO test VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO test VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO test VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO test VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM test'); + +$stmt->execute(); +var_dump($stmt->fetchAll(PDO::FETCH_CLASS, 'Test', [$stmt])); + +?> +--EXPECTF-- +object(PDOStatement)#%d (1) { + ["queryString"]=> + string(27) "SELECT val1, val2 FROM test" +} +string(5) "alpha" +string(5) "alpha" +string(5) "alpha" +array(4) { + [0]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" + } + [1]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "B" + ["val2"]=> + string(4) "beta" + } + [2]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "C" + ["val2"]=> + string(5) "gamma" + } + [3]=> + object(Test)#%d (2) { + ["val1"]=> + string(1) "D" + ["val2"]=> + string(5) "delta" + } +} diff --git a/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch5.phpt b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch5.phpt new file mode 100644 index 0000000000000..bedb3eb69751e --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_change_ctor_args_during_fetch5.phpt @@ -0,0 +1,50 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetchAll() (via warning and error handler) +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); + +class B { + public function __construct() {} +} + +// TODO Rename test table to pdo_fetch_class_change_ctor_five in PHP-8.4 +$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO test VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO test VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO test VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO test VALUES(4, 'D', 'delta')"); + +$stmt = $db->prepare('SELECT val1, val2 FROM test'); +$stmt->execute(); + +function stuffingErrorHandler(int $errno, string $errstr, string $errfile, int $errline) { + global $stmt; + $stmt->setFetchMode(PDO::FETCH_CLASS, 'B', [$errstr]); + echo $errstr, PHP_EOL; +} +set_error_handler(stuffingErrorHandler(...)); + +var_dump($stmt->fetchAll(PDO::FETCH_CLASS|PDO::FETCH_SERIALIZE, 'B', [$stmt])); + +?> +--EXPECTF-- +PDOStatement::fetchAll(): The PDO::FETCH_SERIALIZE mode is deprecated +PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: cannot unserialize class +PDOStatement::fetchAll(): SQLSTATE[HY000]: General error%S +array(0) { +} diff --git a/ext/pdo/tests/pdo_fetch_class_cyclic_ctor.phpt b/ext/pdo/tests/pdo_fetch_class_cyclic_ctor.phpt new file mode 100644 index 0000000000000..3d08403db1a94 --- /dev/null +++ b/ext/pdo/tests/pdo_fetch_class_cyclic_ctor.phpt @@ -0,0 +1,54 @@ +--TEST-- +PDO Common: PDO::FETCH_CLASS with a constructor that changes the ctor args within PDO::fetch() +--EXTENSIONS-- +pdo +--SKIPIF-- + +--FILE-- +exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val1 VARCHAR(10), val2 VARCHAR(10))'); +$db->exec("INSERT INTO test VALUES(1, 'A', 'alpha')"); +$db->exec("INSERT INTO test VALUES(2, 'B', 'beta')"); +$db->exec("INSERT INTO test VALUES(3, 'C', 'gamma')"); +$db->exec("INSERT INTO test VALUES(4, 'D', 'delta')"); + +$args = []; +$args[] = &$args; + +$stmt = $db->prepare('SELECT val1, val2 FROM test'); +$stmt->setFetchMode(PDO::FETCH_CLASS, 'Test', [$args]); + +$stmt->execute(); +var_dump($stmt->fetch()); + +?> +--EXPECTF-- +array(1) { + [0]=> + *RECURSION* +} +object(Test)#%d (2) { + ["val1"]=> + string(1) "A" + ["val2"]=> + string(5) "alpha" +} From c99fb059295ed14034be17904f95e90ea80bb917 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 24 Jan 2025 14:39:30 +0100 Subject: [PATCH 46/54] Fix mysql mysql_native_password error on CircleCI This is already fixed in higher branches. We'll need to fix this properly when upgrading to MySQL 8.4, which we should do soon as 8.3 is already EOL. Closes GH-17560 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2320d2baca9c2..d9ad3f7c0a658 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ jobs: resource_class: arm.medium docker: - image: cimg/base:current-22.04 - - image: mysql:8 + - image: mysql:8.3 environment: MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_ROOT_PASSWORD: '' From 556def741ccd4da973bf27e3eae5d8075386be68 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Mon, 27 Jan 2025 12:41:11 -0500 Subject: [PATCH 47/54] Fix crash in PDO_ODBC statement dtor (#17586) Port of 2ae897fff7af3a794a31a8aeeeeb4f21f6a41393 to PDO_ODBC. --- ext/pdo_odbc/odbc_stmt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index 1df4e22571a76..4bf7162ea06e6 100644 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -136,7 +136,11 @@ static int odbc_stmt_dtor(pdo_stmt_t *stmt) { pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; - if (S->stmt != SQL_NULL_HANDLE) { + // TODO: Factor this out; pg/mysql/firebird do the same thing + bool server_obj_usable = !Z_ISUNDEF(stmt->database_object_handle) + && IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)]) + && !(OBJ_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED); + if (S->stmt != SQL_NULL_HANDLE && server_obj_usable) { if (stmt->executed) { SQLCloseCursor(S->stmt); } From 8ea9b04a2301cb3aaac7ac15612c99ac70352970 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sun, 26 Jan 2025 01:26:48 +0100 Subject: [PATCH 48/54] Fix inline zend_string using struct padding As explained by Snape3058: On 64-bit machines, we typically have 7 bytes of padding between the zend_string.val[0] char and the following char[]. This means that zend_string.val[1-7] write to and read from the struct padding, which is a bad idea. Allocate the given string separately instead. Fixes GH-17564 Closes GH-17576 --- NEWS | 3 ++- ext/opcache/ZendAccelerator.c | 35 ++++++++++++++++++++++------------- ext/opcache/ZendAccelerator.h | 3 +-- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index 28b9116fc47a8..e484b900923ed 100644 --- a/NEWS +++ b/NEWS @@ -17,7 +17,6 @@ PHP NEWS . Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos) . Fix NULL arithmetic in System V shared memory emulation for Windows. (cmb) - - DOM: . Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype). (nielsdos) @@ -43,6 +42,8 @@ PHP NEWS - Opcache: . Fixed bug GH-17307 (Internal closure causes JIT failure). (nielsdos) + . Fixed bug GH-17564 (Potential UB when reading from / writing to struct + padding). (ilutov) - PDO: . Fixed a memory leak when the GC is used to free a PDOStatment. (Girgias) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 66c10021442ad..313f89206f11a 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -141,6 +141,8 @@ static void preload_restart(void); # define LOCKVAL(v) (ZCSG(v)) #endif +#define ZCG_KEY_LEN (MAXPATHLEN * 8) + /** * Clear AVX/SSE2-aligned memory. */ @@ -1190,7 +1192,8 @@ zend_string *accel_make_persistent_key(zend_string *str) char *key; int key_length; - ZSTR_LEN(&ZCG(key)) = 0; + ZEND_ASSERT(GC_REFCOUNT(ZCG(key)) == 1); + ZSTR_LEN(ZCG(key)) = 0; /* CWD and include_path don't matter for absolute file names and streams */ if (IS_ABSOLUTE_PATH(path, path_length)) { @@ -1300,7 +1303,7 @@ zend_string *accel_make_persistent_key(zend_string *str) } /* Calculate key length */ - if (UNEXPECTED((size_t)(cwd_len + path_length + include_path_len + 2) >= sizeof(ZCG(_key)))) { + if (UNEXPECTED((size_t)(cwd_len + path_length + include_path_len + 2) >= ZCG_KEY_LEN)) { return NULL; } @@ -1309,7 +1312,7 @@ zend_string *accel_make_persistent_key(zend_string *str) * since in itself, it may include colons (which we use to separate * different components of the key) */ - key = ZSTR_VAL(&ZCG(key)); + key = ZSTR_VAL(ZCG(key)); memcpy(key, path, path_length); key[path_length] = ':'; key_length = path_length + 1; @@ -1333,7 +1336,7 @@ zend_string *accel_make_persistent_key(zend_string *str) parent_script_len = ZSTR_LEN(parent_script); while ((--parent_script_len > 0) && !IS_SLASH(ZSTR_VAL(parent_script)[parent_script_len])); - if (UNEXPECTED((size_t)(key_length + parent_script_len + 1) >= sizeof(ZCG(_key)))) { + if (UNEXPECTED((size_t)(key_length + parent_script_len + 1) >= ZCG_KEY_LEN)) { return NULL; } key[key_length] = ':'; @@ -1342,11 +1345,9 @@ zend_string *accel_make_persistent_key(zend_string *str) key_length += parent_script_len; } key[key_length] = '\0'; - GC_SET_REFCOUNT(&ZCG(key), 1); - GC_TYPE_INFO(&ZCG(key)) = GC_STRING; - ZSTR_H(&ZCG(key)) = 0; - ZSTR_LEN(&ZCG(key)) = key_length; - return &ZCG(key); + ZSTR_H(ZCG(key)) = 0; + ZSTR_LEN(ZCG(key)) = key_length; + return ZCG(key); } /* not use_cwd */ @@ -2014,8 +2015,8 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) ZCG(cache_opline) == EG(current_execute_data)->opline))) { persistent_script = ZCG(cache_persistent_script); - if (ZSTR_LEN(&ZCG(key))) { - key = &ZCG(key); + if (ZSTR_LEN(ZCG(key))) { + key = ZCG(key); } } else { @@ -2555,7 +2556,7 @@ static zend_string* persistent_zend_resolve_path(zend_string *filename) SHM_PROTECT(); HANDLE_UNBLOCK_INTERRUPTIONS(); } else { - ZSTR_LEN(&ZCG(key)) = 0; + ZSTR_LEN(ZCG(key)) = 0; } ZCG(cache_opline) = EG(current_execute_data) ? EG(current_execute_data)->opline : NULL; ZCG(cache_persistent_script) = persistent_script; @@ -2927,7 +2928,15 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals) ZEND_TSRMLS_CACHE_UPDATE(); #endif memset(accel_globals, 0, sizeof(zend_accel_globals)); + accel_globals->key = zend_string_alloc(ZCG_KEY_LEN, true); +} + +#ifdef ZTS +static void accel_globals_dtor(zend_accel_globals *accel_globals) +{ + zend_string_free(accel_globals->key); } +#endif #ifdef HAVE_HUGE_CODE_PAGES # ifndef _WIN32 @@ -3100,7 +3109,7 @@ static void accel_move_code_to_huge_pages(void) static int accel_startup(zend_extension *extension) { #ifdef ZTS - accel_globals_id = ts_allocate_id(&accel_globals_id, sizeof(zend_accel_globals), (ts_allocate_ctor) accel_globals_ctor, NULL); + accel_globals_id = ts_allocate_id(&accel_globals_id, sizeof(zend_accel_globals), (ts_allocate_ctor) accel_globals_ctor, (ts_allocate_dtor) accel_globals_dtor); #else accel_globals_ctor(&accel_globals); #endif diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index e958e8fd65064..a25f9a1bdf037 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -223,8 +223,7 @@ typedef struct _zend_accel_globals { const zend_op *cache_opline; zend_persistent_script *cache_persistent_script; /* preallocated buffer for keys */ - zend_string key; - char _key[MAXPATHLEN * 8]; + zend_string *key; } zend_accel_globals; typedef struct _zend_string_table { From d17d58a9825675e75a7a5473cf4c7aae0334d056 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 27 Jan 2025 19:59:49 +0100 Subject: [PATCH 49/54] Fix cve-2014-3538 test Make sure we have a unique test file to work with, and increase the time for the nojit version to match the default version. Closes GH-17600 --- ext/fileinfo/tests/cve-2014-3538-mb.phpt | 2 +- ext/fileinfo/tests/cve-2014-3538-nojit.phpt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/fileinfo/tests/cve-2014-3538-mb.phpt b/ext/fileinfo/tests/cve-2014-3538-mb.phpt index 6e8d32ec56716..81733962ebe6a 100644 --- a/ext/fileinfo/tests/cve-2014-3538-mb.phpt +++ b/ext/fileinfo/tests/cve-2014-3538-mb.phpt @@ -32,7 +32,7 @@ if ($t < 3) { Done --CLEAN-- --EXPECTF-- string(%d) "%s" diff --git a/ext/fileinfo/tests/cve-2014-3538-nojit.phpt b/ext/fileinfo/tests/cve-2014-3538-nojit.phpt index f3a5fa7fb4f73..2010d538da951 100644 --- a/ext/fileinfo/tests/cve-2014-3538-nojit.phpt +++ b/ext/fileinfo/tests/cve-2014-3538-nojit.phpt @@ -13,7 +13,7 @@ if (getenv('SKIP_PERF_SENSITIVE')) pcre.jit=0 --FILE-- --EXPECTF-- string(%d) "%s" From 65b990a1e0fd2ce15c4e74301b5a266e00f526f5 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 28 Jan 2025 12:44:24 +0100 Subject: [PATCH 50/54] [skip ci] Another flaky macOS phar test --- ext/phar/tests/tar/033.phpt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/phar/tests/tar/033.phpt b/ext/phar/tests/tar/033.phpt index fa6ed5959cc0c..f13121951fe51 100644 --- a/ext/phar/tests/tar/033.phpt +++ b/ext/phar/tests/tar/033.phpt @@ -5,6 +5,12 @@ phar --INI-- phar.readonly=0 phar.require_hash=0 +--SKIPIF-- + --FILE-- Date: Tue, 28 Jan 2025 12:55:09 +0100 Subject: [PATCH 51/54] Fix missing GC_PERSISTENT_LOCAL flag on accel_globals.key --- ext/opcache/ZendAccelerator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 313f89206f11a..a71a512c03edd 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2929,6 +2929,7 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals) #endif memset(accel_globals, 0, sizeof(zend_accel_globals)); accel_globals->key = zend_string_alloc(ZCG_KEY_LEN, true); + GC_MAKE_PERSISTENT_LOCAL(accel_globals->key); } #ifdef ZTS From d9744869e69c8f56c223d2f4ffb7ab04dd02a130 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 28 Jan 2025 12:58:30 +0100 Subject: [PATCH 52/54] [skip ci] Another flaky macOS phar test --- ext/phar/tests/033.phpt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/phar/tests/033.phpt b/ext/phar/tests/033.phpt index 30d6cf6c55112..4dcff19996d5d 100644 --- a/ext/phar/tests/033.phpt +++ b/ext/phar/tests/033.phpt @@ -5,6 +5,12 @@ phar --INI-- phar.readonly=0 phar.require_hash=0 +--SKIPIF-- + --FILE-- Date: Wed, 29 Jan 2025 09:46:15 +0100 Subject: [PATCH 53/54] relax test for zlib-ng --- ext/standard/tests/filters/gh13264.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/tests/filters/gh13264.phpt b/ext/standard/tests/filters/gh13264.phpt index 6456a082a1e40..e992d0868898d 100644 --- a/ext/standard/tests/filters/gh13264.phpt +++ b/ext/standard/tests/filters/gh13264.phpt @@ -45,5 +45,5 @@ array(4) { ["line"]=> int(%d) } -string(7) "Hello 6" +string(%d) "Hello%s" From b4dbf5f7626de2a29f635e1303c63e9948cba1bf Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 11 Feb 2025 23:03:03 +0100 Subject: [PATCH 54/54] Update versions for PHP 8.3.17 --- 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 e484b900923ed..266a7870ef01e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.3.17 +13 Feb 2025, PHP 8.3.17 - Core: . Fixed bug GH-16892 (ini_parse_quantity() fails to parse inputs starting diff --git a/Zend/zend.h b/Zend/zend.h index 0f73f888a6032..b032ba8b10932 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.3.17-dev" +#define ZEND_VERSION "4.3.17" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index ee039a0bad50a..b5ede07b7b257 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.17-dev],[https://github.com/php/php-src/issues],[php],[https://www.php.net]) +AC_INIT([PHP],[8.3.17],[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 f980e0328e8c3..711a22b40ee8c 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 17 -#define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.3.17-dev" +#define PHP_EXTRA_VERSION "" +#define PHP_VERSION "8.3.17" #define PHP_VERSION_ID 80317