summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-05-19 10:21:13 +0800
committerXinchen Hui <laruence@php.net>2014-05-19 10:21:13 +0800
commit3eeb0dc9f74a0267dfed3b62caffe1c98bea9106 (patch)
treea9cc78860364cbd56e8c1d28197d39891f1cea7f
parent0d3cd2486a872e1c24d12cce286f1f762771aa4e (diff)
parent21da8af578b9359cb1568cb2a184c28e93b916e4 (diff)
downloadphp-git-3eeb0dc9f74a0267dfed3b62caffe1c98bea9106.tar.gz
Merge branch 'phpng' of git.php.net:php-src into phpng
-rw-r--r--.travis.yml3
-rw-r--r--Makefile.gcov2
-rw-r--r--Zend/zend_hash.c108
-rw-r--r--Zend/zend_hash.h18
-rw-r--r--Zend/zend_object_handlers.c2
-rw-r--r--ext/date/lib/parse_date.c207
-rw-r--r--ext/date/lib/parse_date.re11
-rw-r--r--ext/date/lib/timezonedb.h1200
-rw-r--r--ext/date/tests/bug67251.phpt38
-rw-r--r--ext/date/tests/bug67253.phpt44
-rw-r--r--ext/enchant/enchant.c92
-rw-r--r--ext/mysqlnd/mysqlnd.c26
-rw-r--r--ext/mysqlnd/mysqlnd_alloc.c8
-rw-r--r--ext/mysqlnd/mysqlnd_bt.c69
-rw-r--r--ext/opcache/Optimizer/block_pass.c4
-rw-r--r--ext/opcache/Optimizer/compact_literals.c6
-rw-r--r--ext/opcache/Optimizer/pass1_5.c3
-rw-r--r--ext/opcache/Optimizer/pass3.c8
-rw-r--r--ext/opcache/ZendAccelerator.h2
-rw-r--r--ext/opcache/zend_persist.c2
-rw-r--r--ext/pdo/pdo_sql_parser.c9
-rw-r--r--ext/pdo/pdo_sql_parser.re9
-rw-r--r--ext/phar/stream.c48
-rw-r--r--ext/phar/util.c3
-rw-r--r--ext/readline/readline.c137
-rw-r--r--ext/readline/readline_cli.c69
-rw-r--r--ext/session/mod_files.c2
-rw-r--r--ext/sockets/sendrecvmsg.c2
-rw-r--r--ext/spl/spl_array.c17
-rw-r--r--ext/spl/tests/bug66834.phpt15
-rw-r--r--ext/standard/iptc.c3
-rw-r--r--ext/standard/tests/image/bug67250.phpt8
-rw-r--r--ext/standard/tests/strings/bug67252.phpt13
-rw-r--r--ext/standard/uuencode.c3
-rw-r--r--ext/standard/var.c3
-rw-r--r--main/streams/transports.c2
-rw-r--r--sapi/apache2filter/apache_config.c4
37 files changed, 1108 insertions, 1092 deletions
diff --git a/.travis.yml b/.travis.yml
index f661807515..6973f480d1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,7 +9,8 @@ branches:
- phpng
notifications:
- email: false
+ email:
+ on_failure: change
env:
global:
diff --git a/Makefile.gcov b/Makefile.gcov
index 37c1b4b44c..02774b838e 100644
--- a/Makefile.gcov
+++ b/Makefile.gcov
@@ -14,7 +14,7 @@ php_lcov.info: lcov-test
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
- -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
+ -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | sed -e 's/.libs/ZZZZ/g' | sort | sed -e 's/ZZZZ/.libs/g' | uniq` ;\
for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index 41805a2f92..695f05d225 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -486,12 +486,12 @@ ZEND_API int zend_hash_rehash(HashTable *ht)
uint nIndex, i, j;
IS_CONSISTENT(ht);
- memset(ht->arHash, INVALID_IDX, ht->nTableSize * sizeof(zend_uint));
if (UNEXPECTED(ht->nNumOfElements == 0)) {
return SUCCESS;
}
+ memset(ht->arHash, INVALID_IDX, ht->nTableSize * sizeof(zend_uint));
for (i = 0, j = 0; i < ht->nNumUsed; i++) {
p = ht->arData + i;
if (Z_TYPE(p->val) == IS_UNDEF) continue;
@@ -1466,112 +1466,6 @@ ZEND_API zval *zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos)
}
}
-/* This function changes key of current element without changing elements'
- * order. If element with target key already exists, it will be deleted first.
- */
-ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, zend_string *str_index, ulong num_index, int mode)
-{
- uint idx1 = ht->nInternalPointer;
- uint idx2;
- Bucket *p, *q;
- ulong h;
-#ifdef ZEND_SIGNALS
- TSRMLS_FETCH();
-#endif
-
- IS_CONSISTENT(ht);
- if (idx1 != INVALID_IDX) {
- p = ht->arData + idx1;
- if (key_type == HASH_KEY_IS_LONG) {
- if (p->h == num_index && p->key == NULL) {
- return SUCCESS;
- }
-
- idx2 = ht->arHash[num_index & ht->nTableMask];
- while (idx2 != INVALID_IDX) {
- q = ht->arData + idx2;
- if (q->h == num_index && q->key == NULL) {
- break;
- }
- idx2 = Z_NEXT(q->val);
- }
- } else if (key_type == HASH_KEY_IS_STRING) {
- h = STR_HASH_VAL(str_index);
- if (p->key == str_index ||
- (p->h == h &&
- p->key &&
- p->key->len == str_index->len &&
- memcmp(p->key->val, str_index->val, str_index->len) == 0)) {
- return SUCCESS;
- }
-
- idx2 = ht->arHash[h & ht->nTableMask];
- while (idx2 != INVALID_IDX) {
- q = ht->arData + idx2;
- if (q->key == str_index ||
- (q->h == h && q->key && q->key->len == str_index->len &&
- memcmp(q->key->val, str_index->val, str_index->len) == 0)) {
- break;
- }
- idx2 = Z_NEXT(q->val);
- }
- } else {
- return FAILURE;
- }
-
- HANDLE_BLOCK_INTERRUPTIONS();
-
- if (idx2 != INVALID_IDX) {
- /* we have another bucket with the key equal to new one */
- if (mode != HASH_UPDATE_KEY_ANYWAY) {
- int found = (idx1 < idx2) ? HASH_UPDATE_KEY_IF_BEFORE : HASH_UPDATE_KEY_IF_AFTER;
-
- if (mode & found) {
- /* delete current bucket */
- _zend_hash_del_el(ht, idx1, p);
- HANDLE_UNBLOCK_INTERRUPTIONS();
- return FAILURE;
- }
- }
- /* delete another bucket with the same key */
- _zend_hash_del_el(ht, idx2, q);
- }
-
- /* remove old key from hash */
- if (ht->arHash[p->h & ht->nTableMask] == idx1) {
- ht->arHash[p->h & ht->nTableMask] = Z_NEXT(p->val);
- } else {
- uint idx3 = ht->arHash[p->h & ht->nTableMask];
- while (Z_NEXT(ht->arData[idx3].val) != idx1) {
- idx3 = Z_NEXT(ht->arData[idx3].val);
- }
- Z_NEXT(ht->arData[idx3].val) = Z_NEXT(p->val);
- }
-
- /* update key */
- if (p->key) {
- STR_RELEASE(p->key);
- }
- if (key_type == HASH_KEY_IS_LONG) {
- p->h = num_index;
- p->key = NULL;
- } else {
- p->h = h;
- p->key = str_index;
- STR_ADDREF(str_index);
- }
-
- /* insert new key into hash */
- Z_NEXT(p->val) = ht->arHash[p->h & ht->nTableMask];
- ht->arHash[p->h & ht->nTableMask] = idx1;
- HANDLE_UNBLOCK_INTERRUPTIONS();
-
- return SUCCESS;
- } else {
- return FAILURE;
- }
-}
-
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func,
compare_func_t compar, int renumber TSRMLS_DC)
{
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 56c7b9ade2..6f6d9f0ec7 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -35,11 +35,6 @@
#define HASH_NEXT_INSERT (1<<2)
#define HASH_UPDATE_INDIRECT (1<<3)
-#define HASH_UPDATE_KEY_IF_NONE 0
-#define HASH_UPDATE_KEY_IF_BEFORE 1
-#define HASH_UPDATE_KEY_IF_AFTER 2
-#define HASH_UPDATE_KEY_ANYWAY 3
-
#define INVALID_IDX ((uint)-1)
#define HASH_FLAG_PERSISTENT (1<<0)
@@ -152,7 +147,6 @@ ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos)
ZEND_API zval *zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos);
-ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, zend_string *str_index, ulong num_index, int mode);
typedef struct _HashPointer {
HashPosition pos;
@@ -181,8 +175,6 @@ ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr);
zend_hash_internal_pointer_reset_ex(ht, &(ht)->nInternalPointer)
#define zend_hash_internal_pointer_end(ht) \
zend_hash_internal_pointer_end_ex(ht, &(ht)->nInternalPointer)
-#define zend_hash_update_current_key(ht, key_type, str_index, str_length, num_index) \
- zend_hash_update_current_key_ex(ht, key_type, str_index, str_length, num_index, HASH_UPDATE_KEY_ANYWAY)
/* Copying, merging and sorting */
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor);
@@ -373,12 +365,6 @@ static inline int zend_symtable_str_exists(HashTable *ht, const char *str, int l
return zend_hash_str_exists(ht, str, len);
}
-static inline int zend_symtable_update_current_key_ex(HashTable *ht, zend_string *key, int mode)
-{
-ZEND_HANDLE_NUMERIC(key->val, key->len+1, zend_hash_update_current_key_ex(ht, HASH_KEY_IS_LONG, NULL, idx, mode));
- return zend_hash_update_current_key_ex(ht, HASH_KEY_IS_STRING, key, 0, mode);
-}
-
static inline void *zend_hash_add_ptr(HashTable *ht, zend_string *key, void *pData)
{
zval tmp, *zv;
@@ -558,6 +544,10 @@ static inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, HashPositio
} \
} while (0)
+#define ZEND_HASH_FOREACH_BUCKET(ht, _bucket) \
+ ZEND_HASH_FOREACH(ht, 0); \
+ _bucket = _p;
+
#define ZEND_HASH_FOREACH_VAL(ht, _val) \
ZEND_HASH_FOREACH(ht, 0); \
_val = _z;
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index a23fc42635..5dff0d9f50 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -1091,7 +1091,7 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str
if (EG(scope) &&
is_derived_class(fbc->common.scope, EG(scope)) &&
fbc->op_array.fn_flags & ZEND_ACC_CHANGED) {
- if ((func = zend_hash_find(&EG(scope)->function_table, lc_method_name)) == NULL) {
+ if ((func = zend_hash_find(&EG(scope)->function_table, lc_method_name)) != NULL) {
zend_function *priv_fbc = Z_FUNC_P(func);
if (priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE
&& priv_fbc->common.scope == EG(scope)) {
diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
index fd67d8bf52..348482c0e4 100644
--- a/ext/date/lib/parse_date.c
+++ b/ext/date/lib/parse_date.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Feb 6 07:35:53 2014 */
+/* Generated by re2c 0.13.5 on Tue May 13 17:01:57 2014 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -401,9 +401,12 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
{
timelib_sll retval = 0;
- while (!strchr("AaPp", **ptr)) {
+ while (**ptr && !strchr("AaPp", **ptr)) {
++*ptr;
}
+ if(!**ptr) {
+ return TIMELIB_UNSET;
+ }
if (**ptr == 'a' || **ptr == 'A') {
if (h == 12) {
retval = -12;
@@ -837,11 +840,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
std:
s->tok = cursor;
s->len = 0;
-#line 963 "ext/date/lib/parse_date.re"
+#line 966 "ext/date/lib/parse_date.re"
-#line 845 "ext/date/lib/parse_date.c"
+#line 848 "ext/date/lib/parse_date.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -961,7 +964,7 @@ std:
}
yy2:
YYDEBUG(2, *YYCURSOR);
-#line 1049 "ext/date/lib/parse_date.re"
+#line 1052 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@ -977,7 +980,7 @@ yy2:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 981 "ext/date/lib/parse_date.c"
+#line 984 "ext/date/lib/parse_date.c"
yy3:
YYDEBUG(3, *YYCURSOR);
++YYCURSOR;
@@ -1000,7 +1003,7 @@ yy3:
}
yy4:
YYDEBUG(4, *YYCURSOR);
-#line 1643 "ext/date/lib/parse_date.re"
+#line 1646 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -1013,7 +1016,7 @@ yy4:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 1017 "ext/date/lib/parse_date.c"
+#line 1020 "ext/date/lib/parse_date.c"
yy5:
YYDEBUG(5, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1324,12 +1327,12 @@ yy12:
if (yych <= '9') goto yy1385;
yy13:
YYDEBUG(13, *YYCURSOR);
-#line 1738 "ext/date/lib/parse_date.re"
+#line 1741 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
-#line 1333 "ext/date/lib/parse_date.c"
+#line 1336 "ext/date/lib/parse_date.c"
yy14:
YYDEBUG(14, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2386,11 +2389,11 @@ yy49:
if (yych <= '9') goto yy55;
yy50:
YYDEBUG(50, *YYCURSOR);
-#line 1727 "ext/date/lib/parse_date.re"
+#line 1730 "ext/date/lib/parse_date.re"
{
goto std;
}
-#line 2394 "ext/date/lib/parse_date.c"
+#line 2397 "ext/date/lib/parse_date.c"
yy51:
YYDEBUG(51, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2399,12 +2402,12 @@ yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
YYDEBUG(53, *YYCURSOR);
-#line 1732 "ext/date/lib/parse_date.re"
+#line 1735 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 2408 "ext/date/lib/parse_date.c"
+#line 2411 "ext/date/lib/parse_date.c"
yy54:
YYDEBUG(54, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2791,7 +2794,7 @@ yy72:
if (yych == 's') goto yy74;
yy73:
YYDEBUG(73, *YYCURSOR);
-#line 1711 "ext/date/lib/parse_date.re"
+#line 1714 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -2806,7 +2809,7 @@ yy73:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2810 "ext/date/lib/parse_date.c"
+#line 2813 "ext/date/lib/parse_date.c"
yy74:
YYDEBUG(74, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3568,7 +3571,7 @@ yy166:
}
yy167:
YYDEBUG(167, *YYCURSOR);
-#line 1574 "ext/date/lib/parse_date.re"
+#line 1577 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -3585,7 +3588,7 @@ yy167:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
-#line 3589 "ext/date/lib/parse_date.c"
+#line 3592 "ext/date/lib/parse_date.c"
yy168:
YYDEBUG(168, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4105,7 +4108,7 @@ yy193:
}
yy194:
YYDEBUG(194, *YYCURSOR);
-#line 1633 "ext/date/lib/parse_date.re"
+#line 1636 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -4114,7 +4117,7 @@ yy194:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4118 "ext/date/lib/parse_date.c"
+#line 4121 "ext/date/lib/parse_date.c"
yy195:
YYDEBUG(195, *YYCURSOR);
++YYCURSOR;
@@ -4165,7 +4168,7 @@ yy198:
}
yy199:
YYDEBUG(199, *YYCURSOR);
-#line 1379 "ext/date/lib/parse_date.re"
+#line 1382 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@@ -4178,7 +4181,7 @@ yy199:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4182 "ext/date/lib/parse_date.c"
+#line 4185 "ext/date/lib/parse_date.c"
yy200:
YYDEBUG(200, *YYCURSOR);
yyaccept = 6;
@@ -4447,7 +4450,7 @@ yy222:
}
yy223:
YYDEBUG(223, *YYCURSOR);
-#line 1681 "ext/date/lib/parse_date.re"
+#line 1684 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -4476,7 +4479,7 @@ yy223:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 4480 "ext/date/lib/parse_date.c"
+#line 4483 "ext/date/lib/parse_date.c"
yy224:
YYDEBUG(224, *YYCURSOR);
yyaccept = 7;
@@ -5174,7 +5177,7 @@ yy278:
YYDEBUG(278, *YYCURSOR);
++YYCURSOR;
YYDEBUG(279, *YYCURSOR);
-#line 1657 "ext/date/lib/parse_date.re"
+#line 1660 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@@ -5197,7 +5200,7 @@ yy278:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 5201 "ext/date/lib/parse_date.c"
+#line 5204 "ext/date/lib/parse_date.c"
yy280:
YYDEBUG(280, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5375,7 +5378,7 @@ yy294:
++YYCURSOR;
yy295:
YYDEBUG(295, *YYCURSOR);
-#line 1351 "ext/date/lib/parse_date.re"
+#line 1354 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@@ -5388,7 +5391,7 @@ yy295:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 5392 "ext/date/lib/parse_date.c"
+#line 5395 "ext/date/lib/parse_date.c"
yy296:
YYDEBUG(296, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6608,7 +6611,7 @@ yy362:
if (yych <= '9') goto yy365;
yy364:
YYDEBUG(364, *YYCURSOR);
-#line 1495 "ext/date/lib/parse_date.re"
+#line 1498 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@@ -6621,7 +6624,7 @@ yy364:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 6625 "ext/date/lib/parse_date.c"
+#line 6628 "ext/date/lib/parse_date.c"
yy365:
YYDEBUG(365, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7259,7 +7262,7 @@ yy392:
}
yy393:
YYDEBUG(393, *YYCURSOR);
-#line 1553 "ext/date/lib/parse_date.re"
+#line 1556 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@ -7279,7 +7282,7 @@ yy393:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
-#line 7283 "ext/date/lib/parse_date.c"
+#line 7286 "ext/date/lib/parse_date.c"
yy394:
YYDEBUG(394, *YYCURSOR);
yyaccept = 5;
@@ -9029,7 +9032,7 @@ yy454:
++YYCURSOR;
yy455:
YYDEBUG(455, *YYCURSOR);
-#line 1256 "ext/date/lib/parse_date.re"
+#line 1259 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@@ -9040,7 +9043,7 @@ yy455:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 9044 "ext/date/lib/parse_date.c"
+#line 9047 "ext/date/lib/parse_date.c"
yy456:
YYDEBUG(456, *YYCURSOR);
yyaccept = 0;
@@ -9600,7 +9603,7 @@ yy475:
}
yy476:
YYDEBUG(476, *YYCURSOR);
-#line 1393 "ext/date/lib/parse_date.re"
+#line 1396 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@ -9611,7 +9614,7 @@ yy476:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 9615 "ext/date/lib/parse_date.c"
+#line 9618 "ext/date/lib/parse_date.c"
yy477:
YYDEBUG(477, *YYCURSOR);
yyaccept = 10;
@@ -9752,7 +9755,7 @@ yy488:
YYDEBUG(488, *YYCURSOR);
++YYCURSOR;
YYDEBUG(489, *YYCURSOR);
-#line 1111 "ext/date/lib/parse_date.re"
+#line 1114 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9768,7 +9771,7 @@ yy488:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
-#line 9772 "ext/date/lib/parse_date.c"
+#line 9775 "ext/date/lib/parse_date.c"
yy490:
YYDEBUG(490, *YYCURSOR);
yyaccept = 11;
@@ -9781,7 +9784,7 @@ yy490:
}
yy491:
YYDEBUG(491, *YYCURSOR);
-#line 1148 "ext/date/lib/parse_date.re"
+#line 1151 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -9806,7 +9809,7 @@ yy491:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 9810 "ext/date/lib/parse_date.c"
+#line 9813 "ext/date/lib/parse_date.c"
yy492:
YYDEBUG(492, *YYCURSOR);
yyaccept = 11;
@@ -10116,7 +10119,7 @@ yy523:
YYDEBUG(523, *YYCURSOR);
++YYCURSOR;
YYDEBUG(524, *YYCURSOR);
-#line 1128 "ext/date/lib/parse_date.re"
+#line 1131 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@ -10135,7 +10138,7 @@ yy523:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 10139 "ext/date/lib/parse_date.c"
+#line 10142 "ext/date/lib/parse_date.c"
yy525:
YYDEBUG(525, *YYCURSOR);
yyaccept = 11;
@@ -10241,7 +10244,7 @@ yy534:
if (yych <= '9') goto yy541;
yy535:
YYDEBUG(535, *YYCURSOR);
-#line 1310 "ext/date/lib/parse_date.re"
+#line 1313 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@@ -10255,7 +10258,7 @@ yy535:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
-#line 10259 "ext/date/lib/parse_date.c"
+#line 10262 "ext/date/lib/parse_date.c"
yy536:
YYDEBUG(536, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10992,7 +10995,7 @@ yy605:
YYDEBUG(606, *YYCURSOR);
++YYCURSOR;
YYDEBUG(607, *YYCURSOR);
-#line 1325 "ext/date/lib/parse_date.re"
+#line 1328 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@ -11003,7 +11006,7 @@ yy605:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 11007 "ext/date/lib/parse_date.c"
+#line 11010 "ext/date/lib/parse_date.c"
yy608:
YYDEBUG(608, *YYCURSOR);
yyaccept = 11;
@@ -11039,7 +11042,7 @@ yy611:
if (yych <= '9') goto yy605;
yy612:
YYDEBUG(612, *YYCURSOR);
-#line 1337 "ext/date/lib/parse_date.re"
+#line 1340 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@@ -11052,7 +11055,7 @@ yy612:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 11056 "ext/date/lib/parse_date.c"
+#line 11059 "ext/date/lib/parse_date.c"
yy613:
YYDEBUG(613, *YYCURSOR);
yyaccept = 11;
@@ -11693,7 +11696,7 @@ yy656:
}
yy657:
YYDEBUG(657, *YYCURSOR);
-#line 1296 "ext/date/lib/parse_date.re"
+#line 1299 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@@ -11706,7 +11709,7 @@ yy657:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 11710 "ext/date/lib/parse_date.c"
+#line 11713 "ext/date/lib/parse_date.c"
yy658:
YYDEBUG(658, *YYCURSOR);
yyaccept = 13;
@@ -11812,7 +11815,7 @@ yy666:
}
yy667:
YYDEBUG(667, *YYCURSOR);
-#line 1240 "ext/date/lib/parse_date.re"
+#line 1243 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@@ -11827,7 +11830,7 @@ yy667:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
-#line 11831 "ext/date/lib/parse_date.c"
+#line 11834 "ext/date/lib/parse_date.c"
yy668:
YYDEBUG(668, *YYCURSOR);
yyaccept = 14;
@@ -12060,7 +12063,7 @@ yy700:
if (yych <= ':') goto yy704;
yy701:
YYDEBUG(701, *YYCURSOR);
-#line 1523 "ext/date/lib/parse_date.re"
+#line 1526 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@ -12080,7 +12083,7 @@ yy701:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12084 "ext/date/lib/parse_date.c"
+#line 12087 "ext/date/lib/parse_date.c"
yy702:
YYDEBUG(702, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12632,7 +12635,7 @@ yy763:
}
yy764:
YYDEBUG(764, *YYCURSOR);
-#line 1268 "ext/date/lib/parse_date.re"
+#line 1271 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@@ -12645,7 +12648,7 @@ yy764:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 12649 "ext/date/lib/parse_date.c"
+#line 12652 "ext/date/lib/parse_date.c"
yy765:
YYDEBUG(765, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12684,7 +12687,7 @@ yy771:
YYDEBUG(771, *YYCURSOR);
++YYCURSOR;
YYDEBUG(772, *YYCURSOR);
-#line 1509 "ext/date/lib/parse_date.re"
+#line 1512 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@@ -12697,7 +12700,7 @@ yy771:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 12701 "ext/date/lib/parse_date.c"
+#line 12704 "ext/date/lib/parse_date.c"
yy773:
YYDEBUG(773, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12835,7 +12838,7 @@ yy783:
}
yy784:
YYDEBUG(784, *YYCURSOR);
-#line 1544 "ext/date/lib/parse_date.re"
+#line 1547 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@ -12843,7 +12846,7 @@ yy784:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12847 "ext/date/lib/parse_date.c"
+#line 12850 "ext/date/lib/parse_date.c"
yy785:
YYDEBUG(785, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12994,7 +12997,7 @@ yy793:
}
yy794:
YYDEBUG(794, *YYCURSOR);
-#line 1365 "ext/date/lib/parse_date.re"
+#line 1368 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@@ -13007,7 +13010,7 @@ yy794:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 13011 "ext/date/lib/parse_date.c"
+#line 13014 "ext/date/lib/parse_date.c"
yy795:
YYDEBUG(795, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13222,7 +13225,7 @@ yy814:
if (yych <= '7') goto yy817;
yy815:
YYDEBUG(815, *YYCURSOR);
-#line 1476 "ext/date/lib/parse_date.re"
+#line 1479 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@ -13240,7 +13243,7 @@ yy815:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13244 "ext/date/lib/parse_date.c"
+#line 13247 "ext/date/lib/parse_date.c"
yy816:
YYDEBUG(816, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13250,7 +13253,7 @@ yy817:
YYDEBUG(817, *YYCURSOR);
++YYCURSOR;
YYDEBUG(818, *YYCURSOR);
-#line 1457 "ext/date/lib/parse_date.re"
+#line 1460 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@ -13268,7 +13271,7 @@ yy817:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13272 "ext/date/lib/parse_date.c"
+#line 13275 "ext/date/lib/parse_date.c"
yy819:
YYDEBUG(819, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13332,7 +13335,7 @@ yy821:
}
yy822:
YYDEBUG(822, *YYCURSOR);
-#line 1443 "ext/date/lib/parse_date.re"
+#line 1446 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@@ -13345,7 +13348,7 @@ yy822:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
-#line 13349 "ext/date/lib/parse_date.c"
+#line 13352 "ext/date/lib/parse_date.c"
yy823:
YYDEBUG(823, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13448,7 +13451,7 @@ yy842:
++YYCURSOR;
yy843:
YYDEBUG(843, *YYCURSOR);
-#line 1417 "ext/date/lib/parse_date.re"
+#line 1420 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@ -13473,7 +13476,7 @@ yy843:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 13477 "ext/date/lib/parse_date.c"
+#line 13480 "ext/date/lib/parse_date.c"
yy844:
YYDEBUG(844, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13735,7 +13738,7 @@ yy848:
}
yy849:
YYDEBUG(849, *YYCURSOR);
-#line 1405 "ext/date/lib/parse_date.re"
+#line 1408 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@ -13746,7 +13749,7 @@ yy849:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
-#line 13750 "ext/date/lib/parse_date.c"
+#line 13753 "ext/date/lib/parse_date.c"
yy850:
YYDEBUG(850, *YYCURSOR);
yych = *++YYCURSOR;
@@ -14666,7 +14669,7 @@ yy973:
if (yych <= '9') goto yy996;
yy974:
YYDEBUG(974, *YYCURSOR);
-#line 1282 "ext/date/lib/parse_date.re"
+#line 1285 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@@ -14679,7 +14682,7 @@ yy974:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 14683 "ext/date/lib/parse_date.c"
+#line 14686 "ext/date/lib/parse_date.c"
yy975:
YYDEBUG(975, *YYCURSOR);
yyaccept = 22;
@@ -15688,7 +15691,7 @@ yy1066:
}
yy1068:
YYDEBUG(1068, *YYCURSOR);
-#line 1174 "ext/date/lib/parse_date.re"
+#line 1177 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -15710,7 +15713,7 @@ yy1068:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 15714 "ext/date/lib/parse_date.c"
+#line 15717 "ext/date/lib/parse_date.c"
yy1069:
YYDEBUG(1069, *YYCURSOR);
yych = *++YYCURSOR;
@@ -15802,7 +15805,7 @@ yy1075:
}
yy1076:
YYDEBUG(1076, *YYCURSOR);
-#line 1220 "ext/date/lib/parse_date.re"
+#line 1223 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@ -15821,7 +15824,7 @@ yy1076:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 15825 "ext/date/lib/parse_date.c"
+#line 15828 "ext/date/lib/parse_date.c"
yy1077:
YYDEBUG(1077, *YYCURSOR);
yyaccept = 25;
@@ -16719,7 +16722,7 @@ yy1117:
}
yy1118:
YYDEBUG(1118, *YYCURSOR);
-#line 1616 "ext/date/lib/parse_date.re"
+#line 1619 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16735,7 +16738,7 @@ yy1118:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16739 "ext/date/lib/parse_date.c"
+#line 16742 "ext/date/lib/parse_date.c"
yy1119:
YYDEBUG(1119, *YYCURSOR);
++YYCURSOR;
@@ -16786,7 +16789,7 @@ yy1126:
YYDEBUG(1126, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1127, *YYCURSOR);
-#line 1089 "ext/date/lib/parse_date.re"
+#line 1092 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16807,7 +16810,7 @@ yy1126:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
-#line 16811 "ext/date/lib/parse_date.c"
+#line 16814 "ext/date/lib/parse_date.c"
yy1128:
YYDEBUG(1128, *YYCURSOR);
yyaccept = 26;
@@ -16915,7 +16918,7 @@ yy1141:
}
yy1142:
YYDEBUG(1142, *YYCURSOR);
-#line 1592 "ext/date/lib/parse_date.re"
+#line 1595 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16938,7 +16941,7 @@ yy1142:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16942 "ext/date/lib/parse_date.c"
+#line 16945 "ext/date/lib/parse_date.c"
yy1143:
YYDEBUG(1143, *YYCURSOR);
yych = *++YYCURSOR;
@@ -19615,7 +19618,7 @@ yy1294:
goto yy1298;
yy1295:
YYDEBUG(1295, *YYCURSOR);
-#line 1066 "ext/date/lib/parse_date.re"
+#line 1069 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@ -19637,7 +19640,7 @@ yy1295:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19641 "ext/date/lib/parse_date.c"
+#line 19644 "ext/date/lib/parse_date.c"
yy1296:
YYDEBUG(1296, *YYCURSOR);
yyaccept = 28;
@@ -21328,7 +21331,7 @@ yy1385:
if (yych <= '9') goto yy1385;
yy1387:
YYDEBUG(1387, *YYCURSOR);
-#line 1023 "ext/date/lib/parse_date.re"
+#line 1026 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@@ -21353,7 +21356,7 @@ yy1387:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21357 "ext/date/lib/parse_date.c"
+#line 21360 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21789,7 +21792,7 @@ yy1416:
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
-#line 1011 "ext/date/lib/parse_date.re"
+#line 1014 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -21800,7 +21803,7 @@ yy1417:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21804 "ext/date/lib/parse_date.c"
+#line 21807 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21835,7 +21838,7 @@ yy1419:
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
-#line 1001 "ext/date/lib/parse_date.re"
+#line 1004 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@@ -21844,7 +21847,7 @@ yy1420:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21848 "ext/date/lib/parse_date.c"
+#line 21851 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23856,7 +23859,7 @@ yy1499:
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
-#line 980 "ext/date/lib/parse_date.re"
+#line 983 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -23864,7 +23867,7 @@ yy1500:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 23868 "ext/date/lib/parse_date.c"
+#line 23871 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
@@ -24003,7 +24006,7 @@ yy1507:
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
-#line 989 "ext/date/lib/parse_date.re"
+#line 992 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@@ -24014,7 +24017,7 @@ yy1508:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24018 "ext/date/lib/parse_date.c"
+#line 24021 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
@@ -24547,7 +24550,7 @@ yy1530:
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
-#line 968 "ext/date/lib/parse_date.re"
+#line 971 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -24558,7 +24561,7 @@ yy1531:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24562 "ext/date/lib/parse_date.c"
+#line 24565 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
@@ -24731,7 +24734,7 @@ yy1537:
goto yy1531;
}
}
-#line 1742 "ext/date/lib/parse_date.re"
+#line 1745 "ext/date/lib/parse_date.re"
}
@@ -25090,7 +25093,11 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
break;
case '\\': /* escaped char */
- ++fptr;
+ if(!fptr[1]) {
+ add_pbf_error(s, "Escaped character expected", string, begin);
+ break;
+ }
+ fptr++;
if (*ptr == *fptr) {
++ptr;
} else {
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index ba64546de6..277935abec 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -399,9 +399,12 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
{
timelib_sll retval = 0;
- while (!strchr("AaPp", **ptr)) {
+ while (**ptr && !strchr("AaPp", **ptr)) {
++*ptr;
}
+ if(!**ptr) {
+ return TIMELIB_UNSET;
+ }
if (**ptr == 'a' || **ptr == 'A') {
if (h == 12) {
retval = -12;
@@ -2097,7 +2100,11 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
break;
case '\\': /* escaped char */
- ++fptr;
+ if(!fptr[1]) {
+ add_pbf_error(s, "Escaped character expected", string, begin);
+ break;
+ }
+ fptr++;
if (*ptr == *fptr) {
++ptr;
} else {
diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h
index d2292d63b1..da6749c516 100644
--- a/ext/date/lib/timezonedb.h
+++ b/ext/date/lib/timezonedb.h
@@ -13,575 +13,575 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[580] = {
{ "Africa/Brazzaville" , 0x00051C },
{ "Africa/Bujumbura" , 0x000571 },
{ "Africa/Cairo" , 0x0005B5 },
- { "Africa/Casablanca" , 0x000878 },
- { "Africa/Ceuta" , 0x000ADA },
- { "Africa/Conakry" , 0x000DE1 },
- { "Africa/Dakar" , 0x000E4C },
- { "Africa/Dar_es_Salaam" , 0x000EB2 },
- { "Africa/Djibouti" , 0x000F1F },
- { "Africa/Douala" , 0x000F74 },
- { "Africa/El_Aaiun" , 0x000FC9 },
- { "Africa/Freetown" , 0x0011F4 },
- { "Africa/Gaborone" , 0x001303 },
- { "Africa/Harare" , 0x001370 },
- { "Africa/Johannesburg" , 0x0013C5 },
- { "Africa/Juba" , 0x001433 },
- { "Africa/Kampala" , 0x001546 },
- { "Africa/Khartoum" , 0x0015C5 },
- { "Africa/Kigali" , 0x0016D8 },
- { "Africa/Kinshasa" , 0x00172D },
- { "Africa/Lagos" , 0x001788 },
- { "Africa/Libreville" , 0x0017DD },
- { "Africa/Lome" , 0x001832 },
- { "Africa/Luanda" , 0x001876 },
- { "Africa/Lubumbashi" , 0x0018CB },
- { "Africa/Lusaka" , 0x001926 },
- { "Africa/Malabo" , 0x00197B },
- { "Africa/Maputo" , 0x0019E1 },
- { "Africa/Maseru" , 0x001A36 },
- { "Africa/Mbabane" , 0x001A9E },
- { "Africa/Mogadishu" , 0x001AF4 },
- { "Africa/Monrovia" , 0x001B4F },
- { "Africa/Nairobi" , 0x001BB5 },
- { "Africa/Ndjamena" , 0x001C34 },
- { "Africa/Niamey" , 0x001CA0 },
- { "Africa/Nouakchott" , 0x001D13 },
- { "Africa/Ouagadougou" , 0x001D7E },
- { "Africa/Porto-Novo" , 0x001DD3 },
- { "Africa/Sao_Tome" , 0x001E39 },
- { "Africa/Timbuktu" , 0x001E8E },
- { "Africa/Tripoli" , 0x001EF9 },
- { "Africa/Tunis" , 0x002002 },
- { "Africa/Windhoek" , 0x002114 },
- { "America/Adak" , 0x00235B },
- { "America/Anchorage" , 0x0026D1 },
- { "America/Anguilla" , 0x002A45 },
- { "America/Antigua" , 0x002A9A },
- { "America/Araguaina" , 0x002B00 },
- { "America/Argentina/Buenos_Aires" , 0x002C65 },
- { "America/Argentina/Catamarca" , 0x002E13 },
- { "America/Argentina/ComodRivadavia" , 0x002FD4 },
- { "America/Argentina/Cordoba" , 0x00317A },
- { "America/Argentina/Jujuy" , 0x00334F },
- { "America/Argentina/La_Rioja" , 0x003503 },
- { "America/Argentina/Mendoza" , 0x0036BB },
- { "America/Argentina/Rio_Gallegos" , 0x00387B },
- { "America/Argentina/Salta" , 0x003A30 },
- { "America/Argentina/San_Juan" , 0x003BDC },
- { "America/Argentina/San_Luis" , 0x003D94 },
- { "America/Argentina/Tucuman" , 0x003F5A },
- { "America/Argentina/Ushuaia" , 0x004116 },
- { "America/Aruba" , 0x0042D1 },
- { "America/Asuncion" , 0x004337 },
- { "America/Atikokan" , 0x00461C },
- { "America/Atka" , 0x0046F2 },
- { "America/Bahia" , 0x004A58 },
- { "America/Bahia_Banderas" , 0x004BEB },
- { "America/Barbados" , 0x004E64 },
- { "America/Belem" , 0x004EFE },
- { "America/Belize" , 0x004FF9 },
- { "America/Blanc-Sablon" , 0x005175 },
- { "America/Boa_Vista" , 0x005229 },
- { "America/Bogota" , 0x005332 },
- { "America/Boise" , 0x00539E },
- { "America/Buenos_Aires" , 0x005735 },
- { "America/Cambridge_Bay" , 0x0058CE },
- { "America/Campo_Grande" , 0x005BF6 },
- { "America/Cancun" , 0x005EE5 },
- { "America/Caracas" , 0x006127 },
- { "America/Catamarca" , 0x00618E },
- { "America/Cayenne" , 0x006334 },
- { "America/Cayman" , 0x006396 },
- { "America/Chicago" , 0x0063EB },
- { "America/Chihuahua" , 0x006902 },
- { "America/Coral_Harbour" , 0x006B6D },
- { "America/Cordoba" , 0x006BFF },
- { "America/Costa_Rica" , 0x006DA5 },
- { "America/Creston" , 0x006E2F },
- { "America/Cuiaba" , 0x006EBB },
- { "America/Curacao" , 0x007199 },
- { "America/Danmarkshavn" , 0x0071FF },
- { "America/Dawson" , 0x007343 },
- { "America/Dawson_Creek" , 0x007660 },
- { "America/Denver" , 0x00783A },
- { "America/Detroit" , 0x007BC0 },
- { "America/Dominica" , 0x007F1F },
- { "America/Edmonton" , 0x007F74 },
- { "America/Eirunepe" , 0x00832C },
- { "America/El_Salvador" , 0x008444 },
- { "America/Ensenada" , 0x0084B9 },
- { "America/Fort_Wayne" , 0x008960 },
- { "America/Fortaleza" , 0x008822 },
- { "America/Glace_Bay" , 0x008BCA },
- { "America/Godthab" , 0x008F41 },
- { "America/Goose_Bay" , 0x009205 },
- { "America/Grand_Turk" , 0x0096C2 },
- { "America/Grenada" , 0x009971 },
- { "America/Guadeloupe" , 0x0099C6 },
- { "America/Guatemala" , 0x009A1B },
- { "America/Guayaquil" , 0x009AA4 },
- { "America/Guyana" , 0x009B01 },
- { "America/Halifax" , 0x009B82 },
- { "America/Havana" , 0x00A098 },
- { "America/Hermosillo" , 0x00A40B },
- { "America/Indiana/Indianapolis" , 0x00A4E9 },
- { "America/Indiana/Knox" , 0x00A77A },
- { "America/Indiana/Marengo" , 0x00AB11 },
- { "America/Indiana/Petersburg" , 0x00ADB7 },
- { "America/Indiana/Tell_City" , 0x00B304 },
- { "America/Indiana/Vevay" , 0x00B59D },
- { "America/Indiana/Vincennes" , 0x00B7D8 },
- { "America/Indiana/Winamac" , 0x00BA8C },
- { "America/Indianapolis" , 0x00B09A },
- { "America/Inuvik" , 0x00BD45 },
- { "America/Iqaluit" , 0x00C03C },
- { "America/Jamaica" , 0x00C35E },
- { "America/Jujuy" , 0x00C423 },
- { "America/Juneau" , 0x00C5CD },
- { "America/Kentucky/Louisville" , 0x00C94B },
- { "America/Kentucky/Monticello" , 0x00CD69 },
- { "America/Knox_IN" , 0x00D0EE },
- { "America/Kralendijk" , 0x00D45F },
- { "America/La_Paz" , 0x00D4C5 },
- { "America/Lima" , 0x00D52C },
- { "America/Los_Angeles" , 0x00D5D4 },
- { "America/Louisville" , 0x00D9E5 },
- { "America/Lower_Princes" , 0x00DDDA },
- { "America/Maceio" , 0x00DE40 },
- { "America/Managua" , 0x00DF7A },
- { "America/Manaus" , 0x00E02D },
- { "America/Marigot" , 0x00E12F },
- { "America/Martinique" , 0x00E184 },
- { "America/Matamoros" , 0x00E1F0 },
- { "America/Mazatlan" , 0x00E449 },
- { "America/Mendoza" , 0x00E6B6 },
- { "America/Menominee" , 0x00E86A },
- { "America/Merida" , 0x00EBEB },
- { "America/Metlakatla" , 0x00EE26 },
- { "America/Mexico_City" , 0x00EF60 },
- { "America/Miquelon" , 0x00F1DB },
- { "America/Moncton" , 0x00F44D },
- { "America/Monterrey" , 0x00F8E4 },
- { "America/Montevideo" , 0x00FB47 },
- { "America/Montreal" , 0x00FE59 },
- { "America/Montserrat" , 0x010349 },
- { "America/Nassau" , 0x01039E },
- { "America/New_York" , 0x0106E3 },
- { "America/Nipigon" , 0x010BEE },
- { "America/Nome" , 0x010F3F },
- { "America/Noronha" , 0x0112BD },
- { "America/North_Dakota/Beulah" , 0x0113ED },
- { "America/North_Dakota/Center" , 0x011781 },
- { "America/North_Dakota/New_Salem" , 0x011B15 },
- { "America/Ojinaga" , 0x011EBE },
- { "America/Panama" , 0x01211F },
- { "America/Pangnirtung" , 0x012174 },
- { "America/Paramaribo" , 0x0124AA },
- { "America/Phoenix" , 0x01253C },
- { "America/Port-au-Prince" , 0x0125FA },
- { "America/Port_of_Spain" , 0x01291E },
- { "America/Porto_Acre" , 0x01281A },
- { "America/Porto_Velho" , 0x012973 },
- { "America/Puerto_Rico" , 0x012A69 },
- { "America/Rainy_River" , 0x012AD4 },
- { "America/Rankin_Inlet" , 0x012E0C },
- { "America/Recife" , 0x0130F2 },
- { "America/Regina" , 0x01321C },
- { "America/Resolute" , 0x0133DA },
- { "America/Rio_Branco" , 0x0136CB },
- { "America/Rosario" , 0x0137D3 },
- { "America/Santa_Isabel" , 0x013979 },
- { "America/Santarem" , 0x013D1C },
- { "America/Santiago" , 0x013E21 },
- { "America/Santo_Domingo" , 0x0141CA },
- { "America/Sao_Paulo" , 0x014290 },
- { "America/Scoresbysund" , 0x01459F },
- { "America/Shiprock" , 0x01488D },
- { "America/Sitka" , 0x014C06 },
- { "America/St_Barthelemy" , 0x014F8E },
- { "America/St_Johns" , 0x014FE3 },
- { "America/St_Kitts" , 0x015536 },
- { "America/St_Lucia" , 0x01558B },
- { "America/St_Thomas" , 0x0155E0 },
- { "America/St_Vincent" , 0x015635 },
- { "America/Swift_Current" , 0x01568A },
- { "America/Tegucigalpa" , 0x0157AB },
- { "America/Thule" , 0x01582A },
- { "America/Thunder_Bay" , 0x015A71 },
- { "America/Tijuana" , 0x015DBA },
- { "America/Toronto" , 0x016153 },
- { "America/Tortola" , 0x016673 },
- { "America/Vancouver" , 0x0166C8 },
- { "America/Virgin" , 0x016B05 },
- { "America/Whitehorse" , 0x016B5A },
- { "America/Winnipeg" , 0x016E77 },
- { "America/Yakutat" , 0x0172B7 },
- { "America/Yellowknife" , 0x017622 },
- { "Antarctica/Casey" , 0x017932 },
- { "Antarctica/Davis" , 0x0179CF },
- { "Antarctica/DumontDUrville" , 0x017A70 },
- { "Antarctica/Macquarie" , 0x017B02 },
- { "Antarctica/Mawson" , 0x017D49 },
- { "Antarctica/McMurdo" , 0x017DC5 },
- { "Antarctica/Palmer" , 0x018170 },
- { "Antarctica/Rothera" , 0x01848C },
- { "Antarctica/South_Pole" , 0x018502 },
- { "Antarctica/Syowa" , 0x018880 },
- { "Antarctica/Troll" , 0x0188EE },
- { "Antarctica/Vostok" , 0x018AC0 },
- { "Arctic/Longyearbyen" , 0x018B31 },
- { "Asia/Aden" , 0x018E63 },
- { "Asia/Almaty" , 0x018EB8 },
- { "Asia/Amman" , 0x019037 },
- { "Asia/Anadyr" , 0x0192ED },
- { "Asia/Aqtau" , 0x0194D2 },
- { "Asia/Aqtobe" , 0x0196D1 },
- { "Asia/Ashgabat" , 0x019889 },
- { "Asia/Ashkhabad" , 0x0199A6 },
- { "Asia/Baghdad" , 0x019AC3 },
- { "Asia/Bahrain" , 0x019C38 },
- { "Asia/Baku" , 0x019C9E },
- { "Asia/Bangkok" , 0x019F86 },
- { "Asia/Beirut" , 0x019FDB },
- { "Asia/Bishkek" , 0x01A2E8 },
- { "Asia/Brunei" , 0x01A494 },
- { "Asia/Calcutta" , 0x01A4F6 },
- { "Asia/Choibalsan" , 0x01A56F },
- { "Asia/Chongqing" , 0x01A6E8 },
- { "Asia/Chungking" , 0x01A7D7 },
- { "Asia/Colombo" , 0x01A886 },
- { "Asia/Dacca" , 0x01A922 },
- { "Asia/Damascus" , 0x01A9C8 },
- { "Asia/Dhaka" , 0x01AD18 },
- { "Asia/Dili" , 0x01ADBE },
- { "Asia/Dubai" , 0x01AE48 },
- { "Asia/Dushanbe" , 0x01AE9D },
- { "Asia/Gaza" , 0x01AFA0 },
- { "Asia/Harbin" , 0x01B2F3 },
- { "Asia/Hebron" , 0x01B3DA },
- { "Asia/Ho_Chi_Minh" , 0x01B736 },
- { "Asia/Hong_Kong" , 0x01B7AE },
- { "Asia/Hovd" , 0x01B970 },
- { "Asia/Irkutsk" , 0x01BAE8 },
- { "Asia/Istanbul" , 0x01BCCE },
- { "Asia/Jakarta" , 0x01C0BB },
- { "Asia/Jayapura" , 0x01C165 },
- { "Asia/Jerusalem" , 0x01C201 },
- { "Asia/Kabul" , 0x01C530 },
- { "Asia/Kamchatka" , 0x01C581 },
- { "Asia/Karachi" , 0x01C75D },
- { "Asia/Kashgar" , 0x01C812 },
- { "Asia/Kathmandu" , 0x01C8E3 },
- { "Asia/Katmandu" , 0x01C949 },
- { "Asia/Khandyga" , 0x01C9AF },
- { "Asia/Kolkata" , 0x01CBD4 },
- { "Asia/Krasnoyarsk" , 0x01CC4D },
- { "Asia/Kuala_Lumpur" , 0x01CE35 },
- { "Asia/Kuching" , 0x01CEF2 },
- { "Asia/Kuwait" , 0x01CFE0 },
- { "Asia/Macao" , 0x01D035 },
- { "Asia/Macau" , 0x01D170 },
- { "Asia/Magadan" , 0x01D2AB },
- { "Asia/Makassar" , 0x01D48D },
- { "Asia/Manila" , 0x01D552 },
- { "Asia/Muscat" , 0x01D5D7 },
- { "Asia/Nicosia" , 0x01D62C },
- { "Asia/Novokuznetsk" , 0x01D914 },
- { "Asia/Novosibirsk" , 0x01DB16 },
- { "Asia/Omsk" , 0x01DD01 },
- { "Asia/Oral" , 0x01DEE8 },
- { "Asia/Phnom_Penh" , 0x01E0B8 },
- { "Asia/Pontianak" , 0x01E130 },
- { "Asia/Pyongyang" , 0x01E1F2 },
- { "Asia/Qatar" , 0x01E25F },
- { "Asia/Qyzylorda" , 0x01E2C5 },
- { "Asia/Rangoon" , 0x01E49B },
- { "Asia/Riyadh" , 0x01E513 },
- { "Asia/Saigon" , 0x01E568 },
- { "Asia/Sakhalin" , 0x01E5E0 },
- { "Asia/Samarkand" , 0x01E7D7 },
- { "Asia/Seoul" , 0x01E90D },
- { "Asia/Shanghai" , 0x01E9B1 },
- { "Asia/Singapore" , 0x01EA91 },
- { "Asia/Taipei" , 0x01EB48 },
- { "Asia/Tashkent" , 0x01EC60 },
- { "Asia/Tbilisi" , 0x01ED91 },
- { "Asia/Tehran" , 0x01EF4B },
- { "Asia/Tel_Aviv" , 0x01F1B9 },
- { "Asia/Thimbu" , 0x01F4E8 },
- { "Asia/Thimphu" , 0x01F54E },
- { "Asia/Tokyo" , 0x01F5B4 },
- { "Asia/Ujung_Pandang" , 0x01F63D },
- { "Asia/Ulaanbaatar" , 0x01F6BA },
- { "Asia/Ulan_Bator" , 0x01F815 },
- { "Asia/Urumqi" , 0x01F962 },
- { "Asia/Ust-Nera" , 0x01FA29 },
- { "Asia/Vientiane" , 0x01FC2E },
- { "Asia/Vladivostok" , 0x01FCA6 },
- { "Asia/Yakutsk" , 0x01FE92 },
- { "Asia/Yekaterinburg" , 0x020077 },
- { "Asia/Yerevan" , 0x020282 },
- { "Atlantic/Azores" , 0x020482 },
- { "Atlantic/Bermuda" , 0x020985 },
- { "Atlantic/Canary" , 0x020C66 },
- { "Atlantic/Cape_Verde" , 0x020F3C },
- { "Atlantic/Faeroe" , 0x020FB5 },
- { "Atlantic/Faroe" , 0x021259 },
- { "Atlantic/Jan_Mayen" , 0x0214FD },
- { "Atlantic/Madeira" , 0x02182F },
- { "Atlantic/Reykjavik" , 0x021D38 },
- { "Atlantic/South_Georgia" , 0x021EF1 },
- { "Atlantic/St_Helena" , 0x022103 },
- { "Atlantic/Stanley" , 0x021F35 },
- { "Australia/ACT" , 0x022158 },
- { "Australia/Adelaide" , 0x022475 },
- { "Australia/Brisbane" , 0x0227A1 },
- { "Australia/Broken_Hill" , 0x022868 },
- { "Australia/Canberra" , 0x022BA6 },
- { "Australia/Currie" , 0x022EC3 },
- { "Australia/Darwin" , 0x0231F6 },
- { "Australia/Eucla" , 0x02327C },
- { "Australia/Hobart" , 0x023351 },
- { "Australia/LHI" , 0x0236AF },
- { "Australia/Lindeman" , 0x02394A },
- { "Australia/Lord_Howe" , 0x023A2B },
- { "Australia/Melbourne" , 0x023CD6 },
- { "Australia/North" , 0x023FFB },
- { "Australia/NSW" , 0x02406F },
- { "Australia/Perth" , 0x02438C },
- { "Australia/Queensland" , 0x024464 },
- { "Australia/South" , 0x024510 },
- { "Australia/Sydney" , 0x02482D },
- { "Australia/Tasmania" , 0x024B6A },
- { "Australia/Victoria" , 0x024EAF },
- { "Australia/West" , 0x0251CC },
- { "Australia/Yancowinna" , 0x025282 },
- { "Brazil/Acre" , 0x0255A4 },
- { "Brazil/DeNoronha" , 0x0256A8 },
- { "Brazil/East" , 0x0257C8 },
- { "Brazil/West" , 0x025AA5 },
- { "Canada/Atlantic" , 0x025B9D },
- { "Canada/Central" , 0x026085 },
- { "Canada/East-Saskatchewan" , 0x02698F },
- { "Canada/Eastern" , 0x02649F },
- { "Canada/Mountain" , 0x026B18 },
- { "Canada/Newfoundland" , 0x026E8E },
- { "Canada/Pacific" , 0x0273B9 },
- { "Canada/Saskatchewan" , 0x0277D2 },
- { "Canada/Yukon" , 0x02795B },
- { "CET" , 0x027C5E },
- { "Chile/Continental" , 0x027F67 },
- { "Chile/EasterIsland" , 0x028302 },
- { "CST6CDT" , 0x028644 },
- { "Cuba" , 0x028995 },
- { "EET" , 0x028D08 },
- { "Egypt" , 0x028FBB },
- { "Eire" , 0x02927E },
- { "EST" , 0x02978F },
- { "EST5EDT" , 0x0297D3 },
- { "Etc/GMT" , 0x029B24 },
- { "Etc/GMT+0" , 0x029BF0 },
- { "Etc/GMT+1" , 0x029C7A },
- { "Etc/GMT+10" , 0x029D07 },
- { "Etc/GMT+11" , 0x029D95 },
- { "Etc/GMT+12" , 0x029E23 },
- { "Etc/GMT+2" , 0x029F3E },
- { "Etc/GMT+3" , 0x029FCA },
- { "Etc/GMT+4" , 0x02A056 },
- { "Etc/GMT+5" , 0x02A0E2 },
- { "Etc/GMT+6" , 0x02A16E },
- { "Etc/GMT+7" , 0x02A1FA },
- { "Etc/GMT+8" , 0x02A286 },
- { "Etc/GMT+9" , 0x02A312 },
- { "Etc/GMT-0" , 0x029BAC },
- { "Etc/GMT-1" , 0x029C34 },
- { "Etc/GMT-10" , 0x029CC0 },
- { "Etc/GMT-11" , 0x029D4E },
- { "Etc/GMT-12" , 0x029DDC },
- { "Etc/GMT-13" , 0x029E6A },
- { "Etc/GMT-14" , 0x029EB1 },
- { "Etc/GMT-2" , 0x029EF8 },
- { "Etc/GMT-3" , 0x029F84 },
- { "Etc/GMT-4" , 0x02A010 },
- { "Etc/GMT-5" , 0x02A09C },
- { "Etc/GMT-6" , 0x02A128 },
- { "Etc/GMT-7" , 0x02A1B4 },
- { "Etc/GMT-8" , 0x02A240 },
- { "Etc/GMT-9" , 0x02A2CC },
- { "Etc/GMT0" , 0x029B68 },
- { "Etc/Greenwich" , 0x02A358 },
- { "Etc/UCT" , 0x02A39C },
- { "Etc/Universal" , 0x02A3E0 },
- { "Etc/UTC" , 0x02A424 },
- { "Etc/Zulu" , 0x02A468 },
- { "Europe/Amsterdam" , 0x02A4AC },
- { "Europe/Andorra" , 0x02A8EA },
- { "Europe/Athens" , 0x02AB66 },
- { "Europe/Belfast" , 0x02AEA9 },
- { "Europe/Belgrade" , 0x02B3E0 },
- { "Europe/Berlin" , 0x02B6A9 },
- { "Europe/Bratislava" , 0x02BA0D },
- { "Europe/Brussels" , 0x02BD3F },
- { "Europe/Bucharest" , 0x02C176 },
- { "Europe/Budapest" , 0x02C4A0 },
- { "Europe/Busingen" , 0x02C813 },
- { "Europe/Chisinau" , 0x02CACA },
- { "Europe/Copenhagen" , 0x02CE58 },
- { "Europe/Dublin" , 0x02D162 },
- { "Europe/Gibraltar" , 0x02D673 },
- { "Europe/Guernsey" , 0x02DACA },
- { "Europe/Helsinki" , 0x02E001 },
- { "Europe/Isle_of_Man" , 0x02E2B7 },
- { "Europe/Istanbul" , 0x02E7EE },
- { "Europe/Jersey" , 0x02EBDB },
- { "Europe/Kaliningrad" , 0x02F112 },
- { "Europe/Kiev" , 0x02F378 },
- { "Europe/Lisbon" , 0x02F694 },
- { "Europe/Ljubljana" , 0x02FB98 },
- { "Europe/London" , 0x02FE61 },
- { "Europe/Luxembourg" , 0x030398 },
- { "Europe/Madrid" , 0x0307EE },
- { "Europe/Malta" , 0x030BB4 },
- { "Europe/Mariehamn" , 0x030F6D },
- { "Europe/Minsk" , 0x031223 },
- { "Europe/Monaco" , 0x031431 },
- { "Europe/Moscow" , 0x03186C },
- { "Europe/Nicosia" , 0x031ABD },
- { "Europe/Oslo" , 0x031DA5 },
- { "Europe/Paris" , 0x0320D7 },
- { "Europe/Podgorica" , 0x03251D },
- { "Europe/Prague" , 0x0327E6 },
- { "Europe/Riga" , 0x032B18 },
- { "Europe/Rome" , 0x032E5D },
- { "Europe/Samara" , 0x033220 },
- { "Europe/San_Marino" , 0x033453 },
- { "Europe/Sarajevo" , 0x033816 },
- { "Europe/Simferopol" , 0x033ADF },
- { "Europe/Skopje" , 0x033D2B },
- { "Europe/Sofia" , 0x033FF4 },
- { "Europe/Stockholm" , 0x0342FC },
- { "Europe/Tallinn" , 0x0345AB },
- { "Europe/Tirane" , 0x0348E5 },
- { "Europe/Tiraspol" , 0x034BEB },
- { "Europe/Uzhgorod" , 0x034F79 },
- { "Europe/Vaduz" , 0x035290 },
- { "Europe/Vatican" , 0x03553F },
- { "Europe/Vienna" , 0x035902 },
- { "Europe/Vilnius" , 0x035C2F },
- { "Europe/Volgograd" , 0x035F6E },
- { "Europe/Warsaw" , 0x03616E },
- { "Europe/Zagreb" , 0x03654F },
- { "Europe/Zaporozhye" , 0x036818 },
- { "Europe/Zurich" , 0x036B59 },
- { "Factory" , 0x036E08 },
- { "GB" , 0x036E79 },
- { "GB-Eire" , 0x0373B0 },
- { "GMT" , 0x0378E7 },
- { "GMT+0" , 0x0379B3 },
- { "GMT-0" , 0x03796F },
- { "GMT0" , 0x03792B },
- { "Greenwich" , 0x0379F7 },
- { "Hongkong" , 0x037A3B },
- { "HST" , 0x037BFD },
- { "Iceland" , 0x037C41 },
- { "Indian/Antananarivo" , 0x037DFA },
- { "Indian/Chagos" , 0x037E6E },
- { "Indian/Christmas" , 0x037ED0 },
- { "Indian/Cocos" , 0x037F14 },
- { "Indian/Comoro" , 0x037F58 },
- { "Indian/Kerguelen" , 0x037FAD },
- { "Indian/Mahe" , 0x038002 },
- { "Indian/Maldives" , 0x038057 },
- { "Indian/Mauritius" , 0x0380AC },
- { "Indian/Mayotte" , 0x038122 },
- { "Indian/Reunion" , 0x038177 },
- { "Iran" , 0x0381CC },
- { "Israel" , 0x03843A },
- { "Jamaica" , 0x038769 },
- { "Japan" , 0x03882E },
- { "Kwajalein" , 0x0388B7 },
- { "Libya" , 0x03891A },
- { "MET" , 0x038A23 },
- { "Mexico/BajaNorte" , 0x038D2C },
- { "Mexico/BajaSur" , 0x039095 },
- { "Mexico/General" , 0x0392DA },
- { "MST" , 0x039538 },
- { "MST7MDT" , 0x03957C },
- { "Navajo" , 0x0398CD },
- { "NZ" , 0x039C46 },
- { "NZ-CHAT" , 0x039FC4 },
- { "Pacific/Apia" , 0x03A2AC },
- { "Pacific/Auckland" , 0x03A448 },
- { "Pacific/Chatham" , 0x03A7D4 },
- { "Pacific/Chuuk" , 0x03AACB },
- { "Pacific/Easter" , 0x03AB24 },
- { "Pacific/Efate" , 0x03AE82 },
- { "Pacific/Enderbury" , 0x03AF48 },
- { "Pacific/Fakaofo" , 0x03AFB6 },
- { "Pacific/Fiji" , 0x03B007 },
- { "Pacific/Funafuti" , 0x03B19A },
- { "Pacific/Galapagos" , 0x03B1DE },
- { "Pacific/Gambier" , 0x03B256 },
- { "Pacific/Guadalcanal" , 0x03B2BB },
- { "Pacific/Guam" , 0x03B310 },
- { "Pacific/Honolulu" , 0x03B366 },
- { "Pacific/Johnston" , 0x03B3DD },
- { "Pacific/Kiritimati" , 0x03B45C },
- { "Pacific/Kosrae" , 0x03B4C7 },
- { "Pacific/Kwajalein" , 0x03B524 },
- { "Pacific/Majuro" , 0x03B590 },
- { "Pacific/Marquesas" , 0x03B5EF },
- { "Pacific/Midway" , 0x03B656 },
- { "Pacific/Nauru" , 0x03B6E0 },
- { "Pacific/Niue" , 0x03B758 },
- { "Pacific/Norfolk" , 0x03B7B6 },
- { "Pacific/Noumea" , 0x03B80B },
- { "Pacific/Pago_Pago" , 0x03B89B },
- { "Pacific/Palau" , 0x03B924 },
- { "Pacific/Pitcairn" , 0x03B968 },
- { "Pacific/Pohnpei" , 0x03B9BD },
- { "Pacific/Ponape" , 0x03BA12 },
- { "Pacific/Port_Moresby" , 0x03BA57 },
- { "Pacific/Rarotonga" , 0x03BA9B },
- { "Pacific/Saipan" , 0x03BB77 },
- { "Pacific/Samoa" , 0x03BBDA },
- { "Pacific/Tahiti" , 0x03BC63 },
- { "Pacific/Tarawa" , 0x03BCC8 },
- { "Pacific/Tongatapu" , 0x03BD1C },
- { "Pacific/Truk" , 0x03BDA8 },
- { "Pacific/Wake" , 0x03BDED },
- { "Pacific/Wallis" , 0x03BE3D },
- { "Pacific/Yap" , 0x03BE81 },
- { "Poland" , 0x03BEC6 },
- { "Portugal" , 0x03C2A7 },
- { "PRC" , 0x03C7A3 },
- { "PST8PDT" , 0x03C854 },
- { "ROC" , 0x03CBA5 },
- { "ROK" , 0x03CCBD },
- { "Singapore" , 0x03CD61 },
- { "Turkey" , 0x03CE18 },
- { "UCT" , 0x03D205 },
- { "Universal" , 0x03D249 },
- { "US/Alaska" , 0x03D28D },
- { "US/Aleutian" , 0x03D5F6 },
- { "US/Arizona" , 0x03D95C },
- { "US/Central" , 0x03D9EA },
- { "US/East-Indiana" , 0x03E3F4 },
- { "US/Eastern" , 0x03DEF5 },
- { "US/Hawaii" , 0x03E65E },
- { "US/Indiana-Starke" , 0x03E6CF },
- { "US/Michigan" , 0x03EA40 },
- { "US/Mountain" , 0x03ED77 },
- { "US/Pacific" , 0x03F0F0 },
- { "US/Pacific-New" , 0x03F4F5 },
- { "US/Samoa" , 0x03F8FA },
- { "UTC" , 0x03F983 },
- { "W-SU" , 0x03FC7A },
- { "WET" , 0x03F9C7 },
- { "Zulu" , 0x03FEB4 },
+ { "Africa/Casablanca" , 0x0009A4 },
+ { "Africa/Ceuta" , 0x000C06 },
+ { "Africa/Conakry" , 0x000F0D },
+ { "Africa/Dakar" , 0x000F78 },
+ { "Africa/Dar_es_Salaam" , 0x000FDE },
+ { "Africa/Djibouti" , 0x00104B },
+ { "Africa/Douala" , 0x0010A0 },
+ { "Africa/El_Aaiun" , 0x0010F5 },
+ { "Africa/Freetown" , 0x001320 },
+ { "Africa/Gaborone" , 0x00142F },
+ { "Africa/Harare" , 0x00149C },
+ { "Africa/Johannesburg" , 0x0014F1 },
+ { "Africa/Juba" , 0x00155F },
+ { "Africa/Kampala" , 0x001672 },
+ { "Africa/Khartoum" , 0x0016F1 },
+ { "Africa/Kigali" , 0x001804 },
+ { "Africa/Kinshasa" , 0x001859 },
+ { "Africa/Lagos" , 0x0018B4 },
+ { "Africa/Libreville" , 0x001909 },
+ { "Africa/Lome" , 0x00195E },
+ { "Africa/Luanda" , 0x0019A2 },
+ { "Africa/Lubumbashi" , 0x0019F7 },
+ { "Africa/Lusaka" , 0x001A52 },
+ { "Africa/Malabo" , 0x001AA7 },
+ { "Africa/Maputo" , 0x001B0D },
+ { "Africa/Maseru" , 0x001B62 },
+ { "Africa/Mbabane" , 0x001BCA },
+ { "Africa/Mogadishu" , 0x001C20 },
+ { "Africa/Monrovia" , 0x001C7B },
+ { "Africa/Nairobi" , 0x001CE1 },
+ { "Africa/Ndjamena" , 0x001D60 },
+ { "Africa/Niamey" , 0x001DCC },
+ { "Africa/Nouakchott" , 0x001E3F },
+ { "Africa/Ouagadougou" , 0x001EAA },
+ { "Africa/Porto-Novo" , 0x001EFF },
+ { "Africa/Sao_Tome" , 0x001F65 },
+ { "Africa/Timbuktu" , 0x001FBA },
+ { "Africa/Tripoli" , 0x002025 },
+ { "Africa/Tunis" , 0x00212E },
+ { "Africa/Windhoek" , 0x002240 },
+ { "America/Adak" , 0x002487 },
+ { "America/Anchorage" , 0x0027FD },
+ { "America/Anguilla" , 0x002B71 },
+ { "America/Antigua" , 0x002BC6 },
+ { "America/Araguaina" , 0x002C2C },
+ { "America/Argentina/Buenos_Aires" , 0x002D91 },
+ { "America/Argentina/Catamarca" , 0x002F3F },
+ { "America/Argentina/ComodRivadavia" , 0x003100 },
+ { "America/Argentina/Cordoba" , 0x0032A6 },
+ { "America/Argentina/Jujuy" , 0x00347B },
+ { "America/Argentina/La_Rioja" , 0x00362F },
+ { "America/Argentina/Mendoza" , 0x0037E7 },
+ { "America/Argentina/Rio_Gallegos" , 0x0039A7 },
+ { "America/Argentina/Salta" , 0x003B5C },
+ { "America/Argentina/San_Juan" , 0x003D08 },
+ { "America/Argentina/San_Luis" , 0x003EC0 },
+ { "America/Argentina/Tucuman" , 0x004086 },
+ { "America/Argentina/Ushuaia" , 0x004242 },
+ { "America/Aruba" , 0x0043FD },
+ { "America/Asuncion" , 0x004463 },
+ { "America/Atikokan" , 0x004748 },
+ { "America/Atka" , 0x00481E },
+ { "America/Bahia" , 0x004B84 },
+ { "America/Bahia_Banderas" , 0x004D17 },
+ { "America/Barbados" , 0x004F90 },
+ { "America/Belem" , 0x00502A },
+ { "America/Belize" , 0x005125 },
+ { "America/Blanc-Sablon" , 0x0052A1 },
+ { "America/Boa_Vista" , 0x005355 },
+ { "America/Bogota" , 0x00545E },
+ { "America/Boise" , 0x0054CA },
+ { "America/Buenos_Aires" , 0x005861 },
+ { "America/Cambridge_Bay" , 0x0059FA },
+ { "America/Campo_Grande" , 0x005D22 },
+ { "America/Cancun" , 0x006011 },
+ { "America/Caracas" , 0x006253 },
+ { "America/Catamarca" , 0x0062BA },
+ { "America/Cayenne" , 0x006460 },
+ { "America/Cayman" , 0x0064C2 },
+ { "America/Chicago" , 0x006517 },
+ { "America/Chihuahua" , 0x006A2E },
+ { "America/Coral_Harbour" , 0x006C99 },
+ { "America/Cordoba" , 0x006D2B },
+ { "America/Costa_Rica" , 0x006ED1 },
+ { "America/Creston" , 0x006F5B },
+ { "America/Cuiaba" , 0x006FE7 },
+ { "America/Curacao" , 0x0072C5 },
+ { "America/Danmarkshavn" , 0x00732B },
+ { "America/Dawson" , 0x00746F },
+ { "America/Dawson_Creek" , 0x00778C },
+ { "America/Denver" , 0x007966 },
+ { "America/Detroit" , 0x007CEC },
+ { "America/Dominica" , 0x00804B },
+ { "America/Edmonton" , 0x0080A0 },
+ { "America/Eirunepe" , 0x008458 },
+ { "America/El_Salvador" , 0x008570 },
+ { "America/Ensenada" , 0x0085E5 },
+ { "America/Fort_Wayne" , 0x008A8C },
+ { "America/Fortaleza" , 0x00894E },
+ { "America/Glace_Bay" , 0x008CF6 },
+ { "America/Godthab" , 0x00906D },
+ { "America/Goose_Bay" , 0x009331 },
+ { "America/Grand_Turk" , 0x0097EE },
+ { "America/Grenada" , 0x009A9D },
+ { "America/Guadeloupe" , 0x009AF2 },
+ { "America/Guatemala" , 0x009B47 },
+ { "America/Guayaquil" , 0x009BD0 },
+ { "America/Guyana" , 0x009C2D },
+ { "America/Halifax" , 0x009CAE },
+ { "America/Havana" , 0x00A1C4 },
+ { "America/Hermosillo" , 0x00A537 },
+ { "America/Indiana/Indianapolis" , 0x00A615 },
+ { "America/Indiana/Knox" , 0x00A8A6 },
+ { "America/Indiana/Marengo" , 0x00AC3D },
+ { "America/Indiana/Petersburg" , 0x00AEE3 },
+ { "America/Indiana/Tell_City" , 0x00B430 },
+ { "America/Indiana/Vevay" , 0x00B6C9 },
+ { "America/Indiana/Vincennes" , 0x00B904 },
+ { "America/Indiana/Winamac" , 0x00BBB8 },
+ { "America/Indianapolis" , 0x00B1C6 },
+ { "America/Inuvik" , 0x00BE71 },
+ { "America/Iqaluit" , 0x00C168 },
+ { "America/Jamaica" , 0x00C48A },
+ { "America/Jujuy" , 0x00C54F },
+ { "America/Juneau" , 0x00C6F9 },
+ { "America/Kentucky/Louisville" , 0x00CA77 },
+ { "America/Kentucky/Monticello" , 0x00CE95 },
+ { "America/Knox_IN" , 0x00D21A },
+ { "America/Kralendijk" , 0x00D58B },
+ { "America/La_Paz" , 0x00D5F1 },
+ { "America/Lima" , 0x00D658 },
+ { "America/Los_Angeles" , 0x00D700 },
+ { "America/Louisville" , 0x00DB11 },
+ { "America/Lower_Princes" , 0x00DF06 },
+ { "America/Maceio" , 0x00DF6C },
+ { "America/Managua" , 0x00E0A6 },
+ { "America/Manaus" , 0x00E159 },
+ { "America/Marigot" , 0x00E25B },
+ { "America/Martinique" , 0x00E2B0 },
+ { "America/Matamoros" , 0x00E31C },
+ { "America/Mazatlan" , 0x00E575 },
+ { "America/Mendoza" , 0x00E7E2 },
+ { "America/Menominee" , 0x00E996 },
+ { "America/Merida" , 0x00ED17 },
+ { "America/Metlakatla" , 0x00EF52 },
+ { "America/Mexico_City" , 0x00F08C },
+ { "America/Miquelon" , 0x00F307 },
+ { "America/Moncton" , 0x00F579 },
+ { "America/Monterrey" , 0x00FA10 },
+ { "America/Montevideo" , 0x00FC73 },
+ { "America/Montreal" , 0x00FF85 },
+ { "America/Montserrat" , 0x010475 },
+ { "America/Nassau" , 0x0104CA },
+ { "America/New_York" , 0x01080F },
+ { "America/Nipigon" , 0x010D1A },
+ { "America/Nome" , 0x01106B },
+ { "America/Noronha" , 0x0113E9 },
+ { "America/North_Dakota/Beulah" , 0x011519 },
+ { "America/North_Dakota/Center" , 0x0118AD },
+ { "America/North_Dakota/New_Salem" , 0x011C41 },
+ { "America/Ojinaga" , 0x011FEA },
+ { "America/Panama" , 0x01224B },
+ { "America/Pangnirtung" , 0x0122A0 },
+ { "America/Paramaribo" , 0x0125D6 },
+ { "America/Phoenix" , 0x012668 },
+ { "America/Port-au-Prince" , 0x012726 },
+ { "America/Port_of_Spain" , 0x012A4A },
+ { "America/Porto_Acre" , 0x012946 },
+ { "America/Porto_Velho" , 0x012A9F },
+ { "America/Puerto_Rico" , 0x012B95 },
+ { "America/Rainy_River" , 0x012C00 },
+ { "America/Rankin_Inlet" , 0x012F38 },
+ { "America/Recife" , 0x01321E },
+ { "America/Regina" , 0x013348 },
+ { "America/Resolute" , 0x013506 },
+ { "America/Rio_Branco" , 0x0137F7 },
+ { "America/Rosario" , 0x0138FF },
+ { "America/Santa_Isabel" , 0x013AA5 },
+ { "America/Santarem" , 0x013E48 },
+ { "America/Santiago" , 0x013F4D },
+ { "America/Santo_Domingo" , 0x0142F6 },
+ { "America/Sao_Paulo" , 0x0143BC },
+ { "America/Scoresbysund" , 0x0146CB },
+ { "America/Shiprock" , 0x0149B9 },
+ { "America/Sitka" , 0x014D32 },
+ { "America/St_Barthelemy" , 0x0150BA },
+ { "America/St_Johns" , 0x01510F },
+ { "America/St_Kitts" , 0x015662 },
+ { "America/St_Lucia" , 0x0156B7 },
+ { "America/St_Thomas" , 0x01570C },
+ { "America/St_Vincent" , 0x015761 },
+ { "America/Swift_Current" , 0x0157B6 },
+ { "America/Tegucigalpa" , 0x0158D7 },
+ { "America/Thule" , 0x015956 },
+ { "America/Thunder_Bay" , 0x015B9D },
+ { "America/Tijuana" , 0x015EE6 },
+ { "America/Toronto" , 0x01627F },
+ { "America/Tortola" , 0x01679F },
+ { "America/Vancouver" , 0x0167F4 },
+ { "America/Virgin" , 0x016C31 },
+ { "America/Whitehorse" , 0x016C86 },
+ { "America/Winnipeg" , 0x016FA3 },
+ { "America/Yakutat" , 0x0173E3 },
+ { "America/Yellowknife" , 0x01774E },
+ { "Antarctica/Casey" , 0x017A5E },
+ { "Antarctica/Davis" , 0x017AFB },
+ { "Antarctica/DumontDUrville" , 0x017B9C },
+ { "Antarctica/Macquarie" , 0x017C2E },
+ { "Antarctica/Mawson" , 0x017E75 },
+ { "Antarctica/McMurdo" , 0x017EF1 },
+ { "Antarctica/Palmer" , 0x01829C },
+ { "Antarctica/Rothera" , 0x0185B8 },
+ { "Antarctica/South_Pole" , 0x01862E },
+ { "Antarctica/Syowa" , 0x0189AC },
+ { "Antarctica/Troll" , 0x018A1A },
+ { "Antarctica/Vostok" , 0x018BEC },
+ { "Arctic/Longyearbyen" , 0x018C5D },
+ { "Asia/Aden" , 0x018F8F },
+ { "Asia/Almaty" , 0x018FE4 },
+ { "Asia/Amman" , 0x019163 },
+ { "Asia/Anadyr" , 0x019419 },
+ { "Asia/Aqtau" , 0x0195FE },
+ { "Asia/Aqtobe" , 0x0197FD },
+ { "Asia/Ashgabat" , 0x0199B5 },
+ { "Asia/Ashkhabad" , 0x019AD2 },
+ { "Asia/Baghdad" , 0x019BEF },
+ { "Asia/Bahrain" , 0x019D64 },
+ { "Asia/Baku" , 0x019DCA },
+ { "Asia/Bangkok" , 0x01A0B2 },
+ { "Asia/Beirut" , 0x01A107 },
+ { "Asia/Bishkek" , 0x01A414 },
+ { "Asia/Brunei" , 0x01A5C0 },
+ { "Asia/Calcutta" , 0x01A622 },
+ { "Asia/Choibalsan" , 0x01A69B },
+ { "Asia/Chongqing" , 0x01A814 },
+ { "Asia/Chungking" , 0x01A903 },
+ { "Asia/Colombo" , 0x01A9B2 },
+ { "Asia/Dacca" , 0x01AA4E },
+ { "Asia/Damascus" , 0x01AAF4 },
+ { "Asia/Dhaka" , 0x01AE44 },
+ { "Asia/Dili" , 0x01AEEA },
+ { "Asia/Dubai" , 0x01AF74 },
+ { "Asia/Dushanbe" , 0x01AFC9 },
+ { "Asia/Gaza" , 0x01B0CC },
+ { "Asia/Harbin" , 0x01B41F },
+ { "Asia/Hebron" , 0x01B506 },
+ { "Asia/Ho_Chi_Minh" , 0x01B862 },
+ { "Asia/Hong_Kong" , 0x01B8DA },
+ { "Asia/Hovd" , 0x01BA9C },
+ { "Asia/Irkutsk" , 0x01BC14 },
+ { "Asia/Istanbul" , 0x01BDFA },
+ { "Asia/Jakarta" , 0x01C1E7 },
+ { "Asia/Jayapura" , 0x01C291 },
+ { "Asia/Jerusalem" , 0x01C32D },
+ { "Asia/Kabul" , 0x01C65C },
+ { "Asia/Kamchatka" , 0x01C6AD },
+ { "Asia/Karachi" , 0x01C889 },
+ { "Asia/Kashgar" , 0x01C93E },
+ { "Asia/Kathmandu" , 0x01CA0F },
+ { "Asia/Katmandu" , 0x01CA75 },
+ { "Asia/Khandyga" , 0x01CADB },
+ { "Asia/Kolkata" , 0x01CD00 },
+ { "Asia/Krasnoyarsk" , 0x01CD79 },
+ { "Asia/Kuala_Lumpur" , 0x01CF61 },
+ { "Asia/Kuching" , 0x01D01E },
+ { "Asia/Kuwait" , 0x01D10C },
+ { "Asia/Macao" , 0x01D161 },
+ { "Asia/Macau" , 0x01D29C },
+ { "Asia/Magadan" , 0x01D3D7 },
+ { "Asia/Makassar" , 0x01D5B9 },
+ { "Asia/Manila" , 0x01D67E },
+ { "Asia/Muscat" , 0x01D703 },
+ { "Asia/Nicosia" , 0x01D758 },
+ { "Asia/Novokuznetsk" , 0x01DA40 },
+ { "Asia/Novosibirsk" , 0x01DC42 },
+ { "Asia/Omsk" , 0x01DE2D },
+ { "Asia/Oral" , 0x01E014 },
+ { "Asia/Phnom_Penh" , 0x01E1E4 },
+ { "Asia/Pontianak" , 0x01E25C },
+ { "Asia/Pyongyang" , 0x01E31E },
+ { "Asia/Qatar" , 0x01E38B },
+ { "Asia/Qyzylorda" , 0x01E3F1 },
+ { "Asia/Rangoon" , 0x01E5C7 },
+ { "Asia/Riyadh" , 0x01E63F },
+ { "Asia/Saigon" , 0x01E694 },
+ { "Asia/Sakhalin" , 0x01E70C },
+ { "Asia/Samarkand" , 0x01E903 },
+ { "Asia/Seoul" , 0x01EA39 },
+ { "Asia/Shanghai" , 0x01EADD },
+ { "Asia/Singapore" , 0x01EBBD },
+ { "Asia/Taipei" , 0x01EC74 },
+ { "Asia/Tashkent" , 0x01ED8C },
+ { "Asia/Tbilisi" , 0x01EEBD },
+ { "Asia/Tehran" , 0x01F077 },
+ { "Asia/Tel_Aviv" , 0x01F2E5 },
+ { "Asia/Thimbu" , 0x01F614 },
+ { "Asia/Thimphu" , 0x01F67A },
+ { "Asia/Tokyo" , 0x01F6E0 },
+ { "Asia/Ujung_Pandang" , 0x01F769 },
+ { "Asia/Ulaanbaatar" , 0x01F7E6 },
+ { "Asia/Ulan_Bator" , 0x01F941 },
+ { "Asia/Urumqi" , 0x01FA8E },
+ { "Asia/Ust-Nera" , 0x01FB55 },
+ { "Asia/Vientiane" , 0x01FD5A },
+ { "Asia/Vladivostok" , 0x01FDD2 },
+ { "Asia/Yakutsk" , 0x01FFBE },
+ { "Asia/Yekaterinburg" , 0x0201A3 },
+ { "Asia/Yerevan" , 0x0203AE },
+ { "Atlantic/Azores" , 0x0205AE },
+ { "Atlantic/Bermuda" , 0x020AB1 },
+ { "Atlantic/Canary" , 0x020D92 },
+ { "Atlantic/Cape_Verde" , 0x021068 },
+ { "Atlantic/Faeroe" , 0x0210E1 },
+ { "Atlantic/Faroe" , 0x021385 },
+ { "Atlantic/Jan_Mayen" , 0x021629 },
+ { "Atlantic/Madeira" , 0x02195B },
+ { "Atlantic/Reykjavik" , 0x021E64 },
+ { "Atlantic/South_Georgia" , 0x02201D },
+ { "Atlantic/St_Helena" , 0x02222F },
+ { "Atlantic/Stanley" , 0x022061 },
+ { "Australia/ACT" , 0x022284 },
+ { "Australia/Adelaide" , 0x0225A1 },
+ { "Australia/Brisbane" , 0x0228CD },
+ { "Australia/Broken_Hill" , 0x022994 },
+ { "Australia/Canberra" , 0x022CD2 },
+ { "Australia/Currie" , 0x022FEF },
+ { "Australia/Darwin" , 0x023322 },
+ { "Australia/Eucla" , 0x0233A8 },
+ { "Australia/Hobart" , 0x02347D },
+ { "Australia/LHI" , 0x0237DB },
+ { "Australia/Lindeman" , 0x023A76 },
+ { "Australia/Lord_Howe" , 0x023B57 },
+ { "Australia/Melbourne" , 0x023E02 },
+ { "Australia/North" , 0x024127 },
+ { "Australia/NSW" , 0x02419B },
+ { "Australia/Perth" , 0x0244B8 },
+ { "Australia/Queensland" , 0x024590 },
+ { "Australia/South" , 0x02463C },
+ { "Australia/Sydney" , 0x024959 },
+ { "Australia/Tasmania" , 0x024C96 },
+ { "Australia/Victoria" , 0x024FDB },
+ { "Australia/West" , 0x0252F8 },
+ { "Australia/Yancowinna" , 0x0253AE },
+ { "Brazil/Acre" , 0x0256D0 },
+ { "Brazil/DeNoronha" , 0x0257D4 },
+ { "Brazil/East" , 0x0258F4 },
+ { "Brazil/West" , 0x025BD1 },
+ { "Canada/Atlantic" , 0x025CC9 },
+ { "Canada/Central" , 0x0261B1 },
+ { "Canada/East-Saskatchewan" , 0x026ABB },
+ { "Canada/Eastern" , 0x0265CB },
+ { "Canada/Mountain" , 0x026C44 },
+ { "Canada/Newfoundland" , 0x026FBA },
+ { "Canada/Pacific" , 0x0274E5 },
+ { "Canada/Saskatchewan" , 0x0278FE },
+ { "Canada/Yukon" , 0x027A87 },
+ { "CET" , 0x027D8A },
+ { "Chile/Continental" , 0x028093 },
+ { "Chile/EasterIsland" , 0x02842E },
+ { "CST6CDT" , 0x028770 },
+ { "Cuba" , 0x028AC1 },
+ { "EET" , 0x028E34 },
+ { "Egypt" , 0x0290E7 },
+ { "Eire" , 0x0294D6 },
+ { "EST" , 0x0299E7 },
+ { "EST5EDT" , 0x029A2B },
+ { "Etc/GMT" , 0x029D7C },
+ { "Etc/GMT+0" , 0x029E48 },
+ { "Etc/GMT+1" , 0x029ED2 },
+ { "Etc/GMT+10" , 0x029F5F },
+ { "Etc/GMT+11" , 0x029FED },
+ { "Etc/GMT+12" , 0x02A07B },
+ { "Etc/GMT+2" , 0x02A196 },
+ { "Etc/GMT+3" , 0x02A222 },
+ { "Etc/GMT+4" , 0x02A2AE },
+ { "Etc/GMT+5" , 0x02A33A },
+ { "Etc/GMT+6" , 0x02A3C6 },
+ { "Etc/GMT+7" , 0x02A452 },
+ { "Etc/GMT+8" , 0x02A4DE },
+ { "Etc/GMT+9" , 0x02A56A },
+ { "Etc/GMT-0" , 0x029E04 },
+ { "Etc/GMT-1" , 0x029E8C },
+ { "Etc/GMT-10" , 0x029F18 },
+ { "Etc/GMT-11" , 0x029FA6 },
+ { "Etc/GMT-12" , 0x02A034 },
+ { "Etc/GMT-13" , 0x02A0C2 },
+ { "Etc/GMT-14" , 0x02A109 },
+ { "Etc/GMT-2" , 0x02A150 },
+ { "Etc/GMT-3" , 0x02A1DC },
+ { "Etc/GMT-4" , 0x02A268 },
+ { "Etc/GMT-5" , 0x02A2F4 },
+ { "Etc/GMT-6" , 0x02A380 },
+ { "Etc/GMT-7" , 0x02A40C },
+ { "Etc/GMT-8" , 0x02A498 },
+ { "Etc/GMT-9" , 0x02A524 },
+ { "Etc/GMT0" , 0x029DC0 },
+ { "Etc/Greenwich" , 0x02A5B0 },
+ { "Etc/UCT" , 0x02A5F4 },
+ { "Etc/Universal" , 0x02A638 },
+ { "Etc/UTC" , 0x02A67C },
+ { "Etc/Zulu" , 0x02A6C0 },
+ { "Europe/Amsterdam" , 0x02A704 },
+ { "Europe/Andorra" , 0x02AB42 },
+ { "Europe/Athens" , 0x02ADBE },
+ { "Europe/Belfast" , 0x02B101 },
+ { "Europe/Belgrade" , 0x02B638 },
+ { "Europe/Berlin" , 0x02B901 },
+ { "Europe/Bratislava" , 0x02BC65 },
+ { "Europe/Brussels" , 0x02BF97 },
+ { "Europe/Bucharest" , 0x02C3CE },
+ { "Europe/Budapest" , 0x02C6F8 },
+ { "Europe/Busingen" , 0x02CA6B },
+ { "Europe/Chisinau" , 0x02CD22 },
+ { "Europe/Copenhagen" , 0x02D0B0 },
+ { "Europe/Dublin" , 0x02D3BA },
+ { "Europe/Gibraltar" , 0x02D8CB },
+ { "Europe/Guernsey" , 0x02DD22 },
+ { "Europe/Helsinki" , 0x02E259 },
+ { "Europe/Isle_of_Man" , 0x02E50F },
+ { "Europe/Istanbul" , 0x02EA46 },
+ { "Europe/Jersey" , 0x02EE33 },
+ { "Europe/Kaliningrad" , 0x02F36A },
+ { "Europe/Kiev" , 0x02F5D0 },
+ { "Europe/Lisbon" , 0x02F8EC },
+ { "Europe/Ljubljana" , 0x02FDF0 },
+ { "Europe/London" , 0x0300B9 },
+ { "Europe/Luxembourg" , 0x0305F0 },
+ { "Europe/Madrid" , 0x030A46 },
+ { "Europe/Malta" , 0x030E0C },
+ { "Europe/Mariehamn" , 0x0311C5 },
+ { "Europe/Minsk" , 0x03147B },
+ { "Europe/Monaco" , 0x031689 },
+ { "Europe/Moscow" , 0x031AC4 },
+ { "Europe/Nicosia" , 0x031D15 },
+ { "Europe/Oslo" , 0x031FFD },
+ { "Europe/Paris" , 0x03232F },
+ { "Europe/Podgorica" , 0x032775 },
+ { "Europe/Prague" , 0x032A3E },
+ { "Europe/Riga" , 0x032D70 },
+ { "Europe/Rome" , 0x0330B5 },
+ { "Europe/Samara" , 0x033478 },
+ { "Europe/San_Marino" , 0x0336AB },
+ { "Europe/Sarajevo" , 0x033A6E },
+ { "Europe/Simferopol" , 0x033D37 },
+ { "Europe/Skopje" , 0x033F83 },
+ { "Europe/Sofia" , 0x03424C },
+ { "Europe/Stockholm" , 0x034554 },
+ { "Europe/Tallinn" , 0x034803 },
+ { "Europe/Tirane" , 0x034B3D },
+ { "Europe/Tiraspol" , 0x034E43 },
+ { "Europe/Uzhgorod" , 0x0351D1 },
+ { "Europe/Vaduz" , 0x0354E8 },
+ { "Europe/Vatican" , 0x035797 },
+ { "Europe/Vienna" , 0x035B5A },
+ { "Europe/Vilnius" , 0x035E87 },
+ { "Europe/Volgograd" , 0x0361C6 },
+ { "Europe/Warsaw" , 0x0363C6 },
+ { "Europe/Zagreb" , 0x0367A7 },
+ { "Europe/Zaporozhye" , 0x036A70 },
+ { "Europe/Zurich" , 0x036DB1 },
+ { "Factory" , 0x037060 },
+ { "GB" , 0x0370D1 },
+ { "GB-Eire" , 0x037608 },
+ { "GMT" , 0x037B3F },
+ { "GMT+0" , 0x037C0B },
+ { "GMT-0" , 0x037BC7 },
+ { "GMT0" , 0x037B83 },
+ { "Greenwich" , 0x037C4F },
+ { "Hongkong" , 0x037C93 },
+ { "HST" , 0x037E55 },
+ { "Iceland" , 0x037E99 },
+ { "Indian/Antananarivo" , 0x038052 },
+ { "Indian/Chagos" , 0x0380C6 },
+ { "Indian/Christmas" , 0x038128 },
+ { "Indian/Cocos" , 0x03816C },
+ { "Indian/Comoro" , 0x0381B0 },
+ { "Indian/Kerguelen" , 0x038205 },
+ { "Indian/Mahe" , 0x03825A },
+ { "Indian/Maldives" , 0x0382AF },
+ { "Indian/Mauritius" , 0x038304 },
+ { "Indian/Mayotte" , 0x03837A },
+ { "Indian/Reunion" , 0x0383CF },
+ { "Iran" , 0x038424 },
+ { "Israel" , 0x038692 },
+ { "Jamaica" , 0x0389C1 },
+ { "Japan" , 0x038A86 },
+ { "Kwajalein" , 0x038B0F },
+ { "Libya" , 0x038B72 },
+ { "MET" , 0x038C7B },
+ { "Mexico/BajaNorte" , 0x038F84 },
+ { "Mexico/BajaSur" , 0x0392ED },
+ { "Mexico/General" , 0x039532 },
+ { "MST" , 0x039790 },
+ { "MST7MDT" , 0x0397D4 },
+ { "Navajo" , 0x039B25 },
+ { "NZ" , 0x039E9E },
+ { "NZ-CHAT" , 0x03A21C },
+ { "Pacific/Apia" , 0x03A504 },
+ { "Pacific/Auckland" , 0x03A6A0 },
+ { "Pacific/Chatham" , 0x03AA2C },
+ { "Pacific/Chuuk" , 0x03AD23 },
+ { "Pacific/Easter" , 0x03AD7C },
+ { "Pacific/Efate" , 0x03B0DA },
+ { "Pacific/Enderbury" , 0x03B1A0 },
+ { "Pacific/Fakaofo" , 0x03B20E },
+ { "Pacific/Fiji" , 0x03B25F },
+ { "Pacific/Funafuti" , 0x03B3F2 },
+ { "Pacific/Galapagos" , 0x03B436 },
+ { "Pacific/Gambier" , 0x03B4AE },
+ { "Pacific/Guadalcanal" , 0x03B513 },
+ { "Pacific/Guam" , 0x03B568 },
+ { "Pacific/Honolulu" , 0x03B5BE },
+ { "Pacific/Johnston" , 0x03B635 },
+ { "Pacific/Kiritimati" , 0x03B6B4 },
+ { "Pacific/Kosrae" , 0x03B71F },
+ { "Pacific/Kwajalein" , 0x03B77C },
+ { "Pacific/Majuro" , 0x03B7E8 },
+ { "Pacific/Marquesas" , 0x03B847 },
+ { "Pacific/Midway" , 0x03B8AE },
+ { "Pacific/Nauru" , 0x03B938 },
+ { "Pacific/Niue" , 0x03B9B0 },
+ { "Pacific/Norfolk" , 0x03BA0E },
+ { "Pacific/Noumea" , 0x03BA63 },
+ { "Pacific/Pago_Pago" , 0x03BAF3 },
+ { "Pacific/Palau" , 0x03BB7C },
+ { "Pacific/Pitcairn" , 0x03BBC0 },
+ { "Pacific/Pohnpei" , 0x03BC15 },
+ { "Pacific/Ponape" , 0x03BC6A },
+ { "Pacific/Port_Moresby" , 0x03BCAF },
+ { "Pacific/Rarotonga" , 0x03BCF3 },
+ { "Pacific/Saipan" , 0x03BDCF },
+ { "Pacific/Samoa" , 0x03BE32 },
+ { "Pacific/Tahiti" , 0x03BEBB },
+ { "Pacific/Tarawa" , 0x03BF20 },
+ { "Pacific/Tongatapu" , 0x03BF74 },
+ { "Pacific/Truk" , 0x03C000 },
+ { "Pacific/Wake" , 0x03C045 },
+ { "Pacific/Wallis" , 0x03C095 },
+ { "Pacific/Yap" , 0x03C0D9 },
+ { "Poland" , 0x03C11E },
+ { "Portugal" , 0x03C4FF },
+ { "PRC" , 0x03C9FB },
+ { "PST8PDT" , 0x03CAAC },
+ { "ROC" , 0x03CDFD },
+ { "ROK" , 0x03CF15 },
+ { "Singapore" , 0x03CFB9 },
+ { "Turkey" , 0x03D070 },
+ { "UCT" , 0x03D45D },
+ { "Universal" , 0x03D4A1 },
+ { "US/Alaska" , 0x03D4E5 },
+ { "US/Aleutian" , 0x03D84E },
+ { "US/Arizona" , 0x03DBB4 },
+ { "US/Central" , 0x03DC42 },
+ { "US/East-Indiana" , 0x03E64C },
+ { "US/Eastern" , 0x03E14D },
+ { "US/Hawaii" , 0x03E8B6 },
+ { "US/Indiana-Starke" , 0x03E927 },
+ { "US/Michigan" , 0x03EC98 },
+ { "US/Mountain" , 0x03EFCF },
+ { "US/Pacific" , 0x03F348 },
+ { "US/Pacific-New" , 0x03F74D },
+ { "US/Samoa" , 0x03FB52 },
+ { "UTC" , 0x03FBDB },
+ { "W-SU" , 0x03FED2 },
+ { "WET" , 0x03FC1F },
+ { "Zulu" , 0x04010C },
};
/* This is a generated file, do not modify */
-const unsigned char timelib_timezone_db_data_builtin[261880] = {
+const unsigned char timelib_timezone_db_data_builtin[262480] = {
/* Africa/Abidjan */
@@ -712,7 +712,7 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
/* Africa/Cairo */
0x50, 0x48, 0x50, 0x31, 0x01, 0x45, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xC8, 0x93, 0xB4, 0xE0,
+0x00, 0x00, 0x00, 0xB6, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xC8, 0x93, 0xB4, 0xE0,
0xC8, 0xFA, 0x7B, 0xD0, 0xC9, 0xFC, 0xEF, 0xE0, 0xCA, 0xC7, 0xE8, 0xD0, 0xCB, 0xCB, 0xAE, 0x60,
0xCC, 0xDF, 0x29, 0xD0, 0xCD, 0xAC, 0xE1, 0xE0, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0,
0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xAD, 0x50, 0xE8, 0x36, 0x63, 0x60,
@@ -743,18 +743,36 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
0x43, 0x3C, 0x55, 0xD0, 0x44, 0x51, 0x3E, 0xE0, 0x45, 0x12, 0xFD, 0x50, 0x46, 0x31, 0x20, 0xE0,
0x46, 0xE0, 0x6A, 0x50, 0x48, 0x11, 0x02, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xF0, 0xE4, 0xE0,
0x4A, 0x8D, 0xB9, 0x50, 0x4B, 0xDA, 0x01, 0x60, 0x4C, 0x61, 0xBD, 0xD0, 0x4C, 0x89, 0x58, 0xE0,
-0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x4C, 0xA4, 0xFA, 0x50, 0x53, 0x75, 0x38, 0xE0, 0x53, 0xAF, 0x3A, 0xE0, 0x53, 0xD6, 0xC7, 0xE0,
+0x54, 0x24, 0x82, 0x50, 0x55, 0x39, 0x6B, 0x60, 0x55, 0x81, 0xED, 0xE0, 0x55, 0xA9, 0x7A, 0xE0,
+0x56, 0x04, 0x64, 0x50, 0x57, 0x22, 0x87, 0xE0, 0x57, 0x55, 0xF2, 0x60, 0x57, 0x7D, 0x7F, 0x60,
+0x57, 0xED, 0x80, 0xD0, 0x59, 0x02, 0x69, 0xE0, 0x59, 0x28, 0xA5, 0x60, 0x59, 0x50, 0x32, 0x60,
+0x59, 0xCD, 0x62, 0xD0, 0x5A, 0xE2, 0x4B, 0xE0, 0x5A, 0xFB, 0x58, 0x60, 0x5B, 0x22, 0xE5, 0x60,
+0x5B, 0xAD, 0x44, 0xD0, 0x5C, 0xC2, 0x2D, 0xE0, 0x5C, 0xCF, 0x5C, 0xE0, 0x5C, 0xF6, 0xE9, 0xE0,
+0x5D, 0x8D, 0x26, 0xD0, 0x5E, 0xC9, 0x9C, 0xE0, 0x5F, 0x6D, 0x08, 0xD0, 0x60, 0x9C, 0x4F, 0xE0,
+0x61, 0x56, 0x25, 0x50, 0x62, 0x70, 0x54, 0x60, 0x63, 0x36, 0x07, 0x50, 0x64, 0x4A, 0xF0, 0x60,
+0x65, 0x15, 0xE9, 0x50, 0x66, 0x2A, 0xD2, 0x60, 0x66, 0xF5, 0xCB, 0x50, 0x68, 0x0A, 0xB4, 0x60,
+0x68, 0xD5, 0xAD, 0x50, 0x69, 0xEA, 0x96, 0x60, 0x6A, 0xB5, 0x8F, 0x50, 0x6B, 0xD3, 0xB2, 0xE0,
+0x6C, 0x9E, 0xAB, 0xD0, 0x6D, 0xB3, 0x94, 0xE0, 0x6E, 0x7E, 0x8D, 0xD0, 0x6F, 0x93, 0x76, 0xE0,
+0x70, 0x5E, 0x6F, 0xD0, 0x71, 0x73, 0x58, 0xE0, 0x72, 0x3E, 0x51, 0xD0, 0x73, 0x53, 0x3A, 0xE0,
+0x74, 0x1E, 0x33, 0xD0, 0x75, 0x3C, 0x57, 0x60, 0x76, 0x07, 0x50, 0x50, 0x77, 0x1C, 0x39, 0x60,
+0x77, 0xE7, 0x32, 0x50, 0x78, 0xFC, 0x1B, 0x60, 0x79, 0xC7, 0x14, 0x50, 0x7A, 0xDB, 0xFD, 0x60,
+0x7B, 0xA6, 0xF6, 0x50, 0x7C, 0xBB, 0xDF, 0x60, 0x7D, 0x86, 0xD8, 0x50, 0x7E, 0x9B, 0xC1, 0x60,
+0x7F, 0x66, 0xBA, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x00, 0x03, 0x00, 0x00,
-0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x05, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x05, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00,
-0x00, 0x00, 0x00,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x00, 0x03, 0x00, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x05, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20,
+0x00, 0x05, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00,
/* Africa/Casablanca */
0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12036,7 +12054,7 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
/* Egypt */
0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xC8, 0x93, 0xB4, 0xE0,
+0x00, 0x00, 0x00, 0xB6, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xC8, 0x93, 0xB4, 0xE0,
0xC8, 0xFA, 0x7B, 0xD0, 0xC9, 0xFC, 0xEF, 0xE0, 0xCA, 0xC7, 0xE8, 0xD0, 0xCB, 0xCB, 0xAE, 0x60,
0xCC, 0xDF, 0x29, 0xD0, 0xCD, 0xAC, 0xE1, 0xE0, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0,
0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xAD, 0x50, 0xE8, 0x36, 0x63, 0x60,
@@ -12067,18 +12085,36 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
0x43, 0x3C, 0x55, 0xD0, 0x44, 0x51, 0x3E, 0xE0, 0x45, 0x12, 0xFD, 0x50, 0x46, 0x31, 0x20, 0xE0,
0x46, 0xE0, 0x6A, 0x50, 0x48, 0x11, 0x02, 0xE0, 0x48, 0xB7, 0x11, 0xD0, 0x49, 0xF0, 0xE4, 0xE0,
0x4A, 0x8D, 0xB9, 0x50, 0x4B, 0xDA, 0x01, 0x60, 0x4C, 0x61, 0xBD, 0xD0, 0x4C, 0x89, 0x58, 0xE0,
-0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x4C, 0xA4, 0xFA, 0x50, 0x53, 0x75, 0x38, 0xE0, 0x53, 0xAF, 0x3A, 0xE0, 0x53, 0xD6, 0xC7, 0xE0,
+0x54, 0x24, 0x82, 0x50, 0x55, 0x39, 0x6B, 0x60, 0x55, 0x81, 0xED, 0xE0, 0x55, 0xA9, 0x7A, 0xE0,
+0x56, 0x04, 0x64, 0x50, 0x57, 0x22, 0x87, 0xE0, 0x57, 0x55, 0xF2, 0x60, 0x57, 0x7D, 0x7F, 0x60,
+0x57, 0xED, 0x80, 0xD0, 0x59, 0x02, 0x69, 0xE0, 0x59, 0x28, 0xA5, 0x60, 0x59, 0x50, 0x32, 0x60,
+0x59, 0xCD, 0x62, 0xD0, 0x5A, 0xE2, 0x4B, 0xE0, 0x5A, 0xFB, 0x58, 0x60, 0x5B, 0x22, 0xE5, 0x60,
+0x5B, 0xAD, 0x44, 0xD0, 0x5C, 0xC2, 0x2D, 0xE0, 0x5C, 0xCF, 0x5C, 0xE0, 0x5C, 0xF6, 0xE9, 0xE0,
+0x5D, 0x8D, 0x26, 0xD0, 0x5E, 0xC9, 0x9C, 0xE0, 0x5F, 0x6D, 0x08, 0xD0, 0x60, 0x9C, 0x4F, 0xE0,
+0x61, 0x56, 0x25, 0x50, 0x62, 0x70, 0x54, 0x60, 0x63, 0x36, 0x07, 0x50, 0x64, 0x4A, 0xF0, 0x60,
+0x65, 0x15, 0xE9, 0x50, 0x66, 0x2A, 0xD2, 0x60, 0x66, 0xF5, 0xCB, 0x50, 0x68, 0x0A, 0xB4, 0x60,
+0x68, 0xD5, 0xAD, 0x50, 0x69, 0xEA, 0x96, 0x60, 0x6A, 0xB5, 0x8F, 0x50, 0x6B, 0xD3, 0xB2, 0xE0,
+0x6C, 0x9E, 0xAB, 0xD0, 0x6D, 0xB3, 0x94, 0xE0, 0x6E, 0x7E, 0x8D, 0xD0, 0x6F, 0x93, 0x76, 0xE0,
+0x70, 0x5E, 0x6F, 0xD0, 0x71, 0x73, 0x58, 0xE0, 0x72, 0x3E, 0x51, 0xD0, 0x73, 0x53, 0x3A, 0xE0,
+0x74, 0x1E, 0x33, 0xD0, 0x75, 0x3C, 0x57, 0x60, 0x76, 0x07, 0x50, 0x50, 0x77, 0x1C, 0x39, 0x60,
+0x77, 0xE7, 0x32, 0x50, 0x78, 0xFC, 0x1B, 0x60, 0x79, 0xC7, 0x14, 0x50, 0x7A, 0xDB, 0xFD, 0x60,
+0x7B, 0xA6, 0xF6, 0x50, 0x7C, 0xBB, 0xDF, 0x60, 0x7D, 0x86, 0xD8, 0x50, 0x7E, 0x9B, 0xC1, 0x60,
+0x7F, 0x66, 0xBA, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x00, 0x03, 0x00, 0x00,
-0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x05, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x05, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x00, 0x03, 0x00, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x05, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20,
+0x00, 0x05, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Eire */
0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18435,4 +18471,4 @@ const unsigned char timelib_timezone_db_data_builtin[261880] = {
0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
0x00, 0x00, 0x00, 0x00, };
-const timelib_tzdb timezonedb_builtin = { "2014.2", 580, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2014.3", 580, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
diff --git a/ext/date/tests/bug67251.phpt b/ext/date/tests/bug67251.phpt
new file mode 100644
index 0000000000..68c56a1613
--- /dev/null
+++ b/ext/date/tests/bug67251.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Bug #67251 (date_parse_from_format out-of-bounds read)
+--INI--
+date.timezone=Europe/Berlin
+--FILE--
+<?php
+var_dump(date_parse_from_format("\\","AAAABBBB"));
+--EXPECT--
+array(12) {
+ ["year"]=>
+ bool(false)
+ ["month"]=>
+ bool(false)
+ ["day"]=>
+ bool(false)
+ ["hour"]=>
+ bool(false)
+ ["minute"]=>
+ bool(false)
+ ["second"]=>
+ bool(false)
+ ["fraction"]=>
+ bool(false)
+ ["warning_count"]=>
+ int(0)
+ ["warnings"]=>
+ array(0) {
+ }
+ ["error_count"]=>
+ int(2)
+ ["errors"]=>
+ array(1) {
+ [0]=>
+ string(13) "Trailing data"
+ }
+ ["is_localtime"]=>
+ bool(false)
+}
diff --git a/ext/date/tests/bug67253.phpt b/ext/date/tests/bug67253.phpt
new file mode 100644
index 0000000000..b28cbe63c1
--- /dev/null
+++ b/ext/date/tests/bug67253.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Bug #67253 (timelib_meridian_with_check out-of-bounds read)
+--INI--
+date.timezone=Europe/Berlin
+--FILE--
+<?php
+$z = '';
+var_dump(date_parse_from_format("aHa0", "0=G{$z}9UCNnF"));
+--EXPECT--
+array(12) {
+ ["year"]=>
+ bool(false)
+ ["month"]=>
+ bool(false)
+ ["day"]=>
+ bool(false)
+ ["hour"]=>
+ int(0)
+ ["minute"]=>
+ int(0)
+ ["second"]=>
+ int(0)
+ ["fraction"]=>
+ bool(false)
+ ["warning_count"]=>
+ int(0)
+ ["warnings"]=>
+ array(0) {
+ }
+ ["error_count"]=>
+ int(3)
+ ["errors"]=>
+ array(3) {
+ [0]=>
+ string(51) "Meridian can only come after an hour has been found"
+ [1]=>
+ string(29) "A meridian could not be found"
+ [9]=>
+ string(12) "Data missing"
+ }
+ ["is_localtime"]=>
+ bool(false)
+}
+
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index e577b37003..0a4b6bf9f4 100644
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -40,16 +40,14 @@ typedef struct _broker_struct {
EnchantBroker *pbroker;
enchant_dict **dict;
unsigned int dictcnt;
- long rsrc_id;
+ zend_resource *rsrc;
} _enchant_broker;
typedef struct _dict_struct {
unsigned int id;
EnchantDict *pdict;
enchant_broker *pbroker;
- long rsrc_id;
- enchant_dict *next;
- enchant_dict *prev;
+ zend_resource *rsrc;
} _enchant_dict;
@@ -181,20 +179,19 @@ enumerate_providers_fn (const char * const name,
void * ud) /* {{{ */
{
zval *zdesc = (zval *) ud;
- zval *tmp_array;
+ zval tmp_array;
- MAKE_STD_ZVAL(tmp_array);
- array_init(tmp_array);
+ array_init(&tmp_array);
- add_assoc_string(tmp_array, "name", (char *)name);
- add_assoc_string(tmp_array, "desc", (char *)desc);
- add_assoc_string(tmp_array, "file", (char *)file);
+ add_assoc_string(&tmp_array, "name", (char *)name);
+ add_assoc_string(&tmp_array, "desc", (char *)desc);
+ add_assoc_string(&tmp_array, "file", (char *)file);
if (Z_TYPE_P(zdesc)!=IS_ARRAY) {
array_init(zdesc);
}
- add_next_index_zval(zdesc, tmp_array);
+ add_next_index_zval(zdesc, &tmp_array);
}
/* }}} */
@@ -219,24 +216,23 @@ static void php_enchant_list_dicts_fn( const char * const lang_tag,
const char * const provider_file, void * ud) /* {{{ */
{
zval *zdesc = (zval *) ud;
- zval *tmp_array;
+ zval tmp_array;
- MAKE_STD_ZVAL(tmp_array);
- array_init(tmp_array);
- add_assoc_string(tmp_array, "lang_tag", (char *)lang_tag);
- add_assoc_string(tmp_array, "provider_name", (char *)provider_name);
- add_assoc_string(tmp_array, "provider_desc", (char *)provider_desc);
- add_assoc_string(tmp_array, "provider_file", (char *)provider_file);
+ array_init(&tmp_array);
+ add_assoc_string(&tmp_array, "lang_tag", (char *)lang_tag);
+ add_assoc_string(&tmp_array, "provider_name", (char *)provider_name);
+ add_assoc_string(&tmp_array, "provider_desc", (char *)provider_desc);
+ add_assoc_string(&tmp_array, "provider_file", (char *)provider_file);
if (Z_TYPE_P(zdesc) != IS_ARRAY) {
array_init(zdesc);
}
- add_next_index_zval(zdesc, tmp_array);
+ add_next_index_zval(zdesc, &tmp_array);
}
/* }}} */
-static void php_enchant_broker_free(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
+static void php_enchant_broker_free(zend_resource *rsrc TSRMLS_DC) /* {{{ */
{
if (rsrc->ptr) {
enchant_broker *broker = (enchant_broker *)rsrc->ptr;
@@ -247,8 +243,12 @@ static void php_enchant_broker_free(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{
int total;
total = broker->dictcnt-1;
do {
- zend_list_delete(broker->dict[total]->rsrc_id);
- efree(broker->dict[total]);
+ if (broker->dict[total]) {
+ enchant_dict *pdict = broker->dict[total];
+ broker->dict[total] = NULL;
+ zend_list_free(pdict->rsrc);
+ efree(pdict);
+ }
total--;
} while (total>=0);
}
@@ -263,20 +263,21 @@ static void php_enchant_broker_free(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{
}
/* }}} */
-static void php_enchant_dict_free(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
+static void php_enchant_dict_free(zend_resource *rsrc TSRMLS_DC) /* {{{ */
{
if (rsrc->ptr) {
enchant_dict *pdict = (enchant_dict *)rsrc->ptr;
if (pdict) {
- if (pdict->pdict && pdict->pbroker) {
- enchant_broker_free_dict(pdict->pbroker->pbroker, pdict->pdict);
- if (pdict->id) {
- pdict->pbroker->dict[pdict->id-1]->next = NULL;
- }
- zend_list_delete(pdict->pbroker->rsrc_id);
+ enchant_broker *pbroker = pdict->pbroker;
+
+ if (pdict->pdict && pbroker) {
+ enchant_broker_free_dict(pbroker->pbroker, pdict->pdict);
}
+ pbroker->dict[pdict->id] = NULL;
+ efree(pdict);
+ zend_list_delete(pbroker->rsrc);
}
}
}
@@ -337,14 +338,14 @@ PHP_MINFO_FUNCTION(enchant)
/* }}} */
#define PHP_ENCHANT_GET_BROKER \
- ZEND_FETCH_RESOURCE(pbroker, enchant_broker *, &broker, -1, "enchant_broker", le_enchant_broker); \
+ ZEND_FETCH_RESOURCE(pbroker, enchant_broker *, broker, -1, "enchant_broker", le_enchant_broker); \
if (!pbroker || !pbroker->pbroker) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", "Resource broker invalid"); \
RETURN_FALSE; \
}
#define PHP_ENCHANT_GET_DICT \
- ZEND_FETCH_RESOURCE(pdict, enchant_dict *, &dict, -1, "enchant_dict", le_enchant_dict); \
+ ZEND_FETCH_RESOURCE(pdict, enchant_dict *, dict, -1, "enchant_dict", le_enchant_dict); \
if (!pdict || !pdict->pdict) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", "Invalid dictionary resource."); \
RETURN_FALSE; \
@@ -368,7 +369,7 @@ PHP_FUNCTION(enchant_broker_init)
broker->pbroker = pbroker;
broker->dict = NULL;
broker->dictcnt = 0;
- broker->rsrc_id = ZEND_REGISTER_RESOURCE(return_value, broker, le_enchant_broker);
+ broker->rsrc = ZEND_REGISTER_RESOURCE(return_value, broker, le_enchant_broker);
} else {
RETURN_FALSE;
}
@@ -387,7 +388,7 @@ PHP_FUNCTION(enchant_broker_free)
}
PHP_ENCHANT_GET_BROKER;
- zend_list_delete(Z_RESVAL_P(broker));
+ zend_list_close(Z_RES_P(broker));
RETURN_TRUE;
}
/* }}} */
@@ -408,7 +409,7 @@ PHP_FUNCTION(enchant_broker_get_error)
msg = enchant_broker_get_error(pbroker->pbroker);
if (msg) {
- RETURN_STRING((char *)msg, 1);
+ RETURN_STRING((char *)msg);
}
RETURN_FALSE;
}
@@ -563,16 +564,10 @@ PHP_FUNCTION(enchant_broker_request_dict)
dict->id = pos;
dict->pbroker = pbroker;
dict->pdict = d;
- dict->prev = pos ? pbroker->dict[pos-1] : NULL;
- dict->next = NULL;
pbroker->dict[pos] = dict;
- if (pos) {
- pbroker->dict[pos-1]->next = dict;
- }
-
- dict->rsrc_id = ZEND_REGISTER_RESOURCE(return_value, dict, le_enchant_dict);
- zend_list_addref(pbroker->rsrc_id);
+ dict->rsrc = ZEND_REGISTER_RESOURCE(return_value, dict, le_enchant_dict);
+ pbroker->rsrc->gc.refcount++;
} else {
RETURN_FALSE;
}
@@ -619,13 +614,10 @@ PHP_FUNCTION(enchant_broker_request_pwl_dict)
dict->id = pos;
dict->pbroker = pbroker;
dict->pdict = d;
- dict->prev = pos?pbroker->dict[pos-1]:NULL;
- dict->next = NULL;
pbroker->dict[pos] = dict;
- if (pos) {
- pbroker->dict[pos-1]->next = dict;
- }
- dict->rsrc_id = ZEND_REGISTER_RESOURCE(return_value, dict, le_enchant_dict);
+
+ dict->rsrc = ZEND_REGISTER_RESOURCE(return_value, dict, le_enchant_dict);
+ pbroker->rsrc->gc.refcount++;
} else {
RETURN_FALSE;
}
@@ -645,7 +637,7 @@ PHP_FUNCTION(enchant_broker_free_dict)
PHP_ENCHANT_GET_DICT;
- zend_list_delete(Z_RESVAL_P(dict));
+ zend_list_close(Z_RES_P(dict));
RETURN_TRUE;
}
/* }}} */
@@ -909,7 +901,7 @@ PHP_FUNCTION(enchant_dict_get_error)
msg = enchant_dict_get_error(pdict->pdict);
if (msg) {
- RETURN_STRING((char *)msg, 1);
+ RETURN_STRING((char *)msg);
}
RETURN_FALSE;
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 893a144c4b..b6d36221cf 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -2416,7 +2416,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c
case MYSQL_OPT_CONNECT_ATTR_DELETE:
if (conn->options->connect_attr && value) {
DBG_INF_FMT("Before delete %d attribute(s)", zend_hash_num_elements(conn->options->connect_attr));
- zend_hash_del(conn->options->connect_attr, value, strlen(value));
+ zend_hash_str_del(conn->options->connect_attr, value, strlen(value));
DBG_INF_FMT("%d left", zend_hash_num_elements(conn->options->connect_attr));
}
break;
@@ -2500,7 +2500,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d)(MYSQLND_CONN_DATA * cons
if (!copyv) {
goto oom;
}
- zend_hash_update(conn->options->connect_attr, key, strlen(key), &copyv, sizeof(char *), NULL);
+ zend_hash_str_update_ptr(conn->options->connect_attr, key, strlen(key), (void*)&copyv);
}
break;
default:
@@ -2669,24 +2669,24 @@ static void
MYSQLND_METHOD(mysqlnd_conn_data, tx_cor_options_to_string)(const MYSQLND_CONN_DATA * const conn, smart_str * str, const unsigned int mode TSRMLS_DC)
{
if (mode & TRANS_COR_AND_CHAIN && !(mode & TRANS_COR_AND_NO_CHAIN)) {
- if (str->len) {
+ if (str->s->len) {
smart_str_appendl(str, " ", sizeof(" ") - 1);
}
smart_str_appendl(str, "AND CHAIN", sizeof("AND CHAIN") - 1);
} else if (mode & TRANS_COR_AND_NO_CHAIN && !(mode & TRANS_COR_AND_CHAIN)) {
- if (str->len) {
+ if (str->s->len) {
smart_str_appendl(str, " ", sizeof(" ") - 1);
}
smart_str_appendl(str, "AND NO CHAIN", sizeof("AND NO CHAIN") - 1);
}
if (mode & TRANS_COR_RELEASE && !(mode & TRANS_COR_NO_RELEASE)) {
- if (str->len) {
+ if (str->s->len) {
smart_str_appendl(str, " ", sizeof(" ") - 1);
}
smart_str_appendl(str, "RELEASE", sizeof("RELEASE") - 1);
} else if (mode & TRANS_COR_NO_RELEASE && !(mode & TRANS_COR_RELEASE)) {
- if (str->len) {
+ if (str->s->len) {
smart_str_appendl(str, " ", sizeof(" ") - 1);
}
smart_str_appendl(str, "NO RELEASE", sizeof("NO RELEASE") - 1);
@@ -2749,7 +2749,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * con
if (PASS == conn->m->local_tx_start(conn, this_func TSRMLS_CC)) {
do {
- smart_str tmp_str = {0, 0, 0};
+ smart_str tmp_str = {0, 0};
conn->m->tx_cor_options_to_string(conn, &tmp_str, flags TSRMLS_CC);
smart_str_0(&tmp_str);
@@ -2760,7 +2760,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * con
char * name_esc = mysqlnd_escape_string_for_tx_name_in_comment(name TSRMLS_CC);
query_len = mnd_sprintf(&query, 0, (commit? "COMMIT%s %s":"ROLLBACK%s %s"),
- name_esc? name_esc:"", tmp_str.c? tmp_str.c:"");
+ name_esc? name_esc:"", tmp_str.s->val? tmp_str.s->val:"");
smart_str_free(&tmp_str);
if (name_esc) {
mnd_efree(name_esc);
@@ -2793,9 +2793,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsi
if (PASS == conn->m->local_tx_start(conn, this_func TSRMLS_CC)) {
do {
- smart_str tmp_str = {0, 0, 0};
+ smart_str tmp_str = {0, 0};
if (mode & TRANS_START_WITH_CONSISTENT_SNAPSHOT) {
- if (tmp_str.len) {
+ if (tmp_str.s->len) {
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
}
smart_str_appendl(&tmp_str, "WITH CONSISTENT SNAPSHOT", sizeof("WITH CONSISTENT SNAPSHOT") - 1);
@@ -2807,12 +2807,12 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsi
smart_str_free(&tmp_str);
break;
} else if (mode & TRANS_START_READ_WRITE) {
- if (tmp_str.len) {
+ if (tmp_str.s->len) {
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
}
smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1);
} else if (mode & TRANS_START_READ_ONLY) {
- if (tmp_str.len) {
+ if (tmp_str.s->len) {
smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1);
}
smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1);
@@ -2823,7 +2823,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsi
{
char * name_esc = mysqlnd_escape_string_for_tx_name_in_comment(name TSRMLS_CC);
char * query;
- unsigned int query_len = mnd_sprintf(&query, 0, "START TRANSACTION%s %s", name_esc? name_esc:"", tmp_str.c? tmp_str.c:"");
+ unsigned int query_len = mnd_sprintf(&query, 0, "START TRANSACTION%s %s", name_esc? name_esc:"", tmp_str.s->val? tmp_str.s->val:"");
smart_str_free(&tmp_str);
if (name_esc) {
mnd_efree(name_esc);
diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c
index 42ce55a36a..c3228aa4f1 100644
--- a/ext/mysqlnd/mysqlnd_alloc.c
+++ b/ext/mysqlnd/mysqlnd_alloc.c
@@ -582,7 +582,7 @@ char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persi
char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D)
{
char * ret;
- smart_str tmp_str = {0, 0, 0};
+ smart_str tmp_str = {0, 0};
const char * p = ptr;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
TRACE_ALLOC_ENTER(mysqlnd_pestrdup_name);
@@ -597,11 +597,11 @@ char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_ME
smart_str_appendc(&tmp_str, *p);
} while (*p++);
- ret = (persistent) ? __zend_malloc(tmp_str.len + sizeof(size_t)) : _emalloc(REAL_SIZE(tmp_str.len + sizeof(size_t)) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
- memcpy(FAKE_PTR(ret), tmp_str.c, tmp_str.len);
+ ret = (persistent) ? __zend_malloc(tmp_str.s->len + sizeof(size_t)) : _emalloc(REAL_SIZE(tmp_str.s->len + sizeof(size_t)) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ memcpy(FAKE_PTR(ret), tmp_str.s->val, tmp_str.s->len);
if (ret && collect_memory_statistics) {
- *(size_t *) ret = tmp_str.len;
+ *(size_t *) ret = tmp_str.s->len;
MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_STRDUP_COUNT : STAT_MEM_ESTRDUP_COUNT);
}
smart_str_free(&tmp_str);
diff --git a/ext/mysqlnd/mysqlnd_bt.c b/ext/mysqlnd/mysqlnd_bt.c
index a93af6b395..94b73f00e3 100644
--- a/ext/mysqlnd/mysqlnd_bt.c
+++ b/ext/mysqlnd/mysqlnd_bt.c
@@ -41,16 +41,17 @@
#define TRACE_APPEND_STR(val) \
TRACE_APPEND_STRL(val, sizeof(val)-1)
-#define TRACE_APPEND_KEY(key) \
- if (zend_hash_find(ht, key, sizeof(key), (void**)&tmp) == SUCCESS) { \
- TRACE_APPEND_STRL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); \
- }
+inline void trace_append_key(HashTable *ht, const char *key) {
+ zval *ztmp;
+ if ((ztmp = zend_hash_str_find(ht, key, sizeof(key))) != NULL) {
+ TRACE_APPEND_STRL(Z_STRVAL_P(ztmp)->val, Z_STRVAL_P(ztmp)->len);
+ }
+}
/* }}} */
-
static int
-mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
+mysqlnd_build_trace_args(zval *arg TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
{
char **str;
int *len;
@@ -64,20 +65,20 @@ mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_
* but that could cause some E_NOTICE and also damn long lines.
*/
- switch (Z_TYPE_PP(arg)) {
+ switch (Z_TYPE_P(arg)) {
case IS_NULL:
TRACE_APPEND_STR("NULL, ");
break;
case IS_STRING: {
int l_added;
TRACE_APPEND_CHR('\'');
- if (Z_STRLEN_PP(arg) > 15) {
- TRACE_APPEND_STRL(Z_STRVAL_PP(arg), 15);
+ if (Z_STRLEN_P(arg) > 15) {
+ TRACE_APPEND_STRL(Z_STRVAL_P(arg), 15);
TRACE_APPEND_STR("...', ");
l_added = 15 + 6 + 1; /* +1 because of while (--l_added) */
} else {
- l_added = Z_STRLEN_PP(arg);
- TRACE_APPEND_STRL(Z_STRVAL_PP(arg), l_added);
+ l_added = Z_STRLEN_P(arg);
+ TRACE_APPEND_STRL(Z_STRVAL_P(arg), l_added);
TRACE_APPEND_STR("', ");
l_added += 3 + 1;
}
@@ -88,18 +89,17 @@ mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_
}
break;
}
- case IS_BOOL:
- if (Z_LVAL_PP(arg)) {
+ case IS_TRUE:
TRACE_APPEND_STR("true, ");
- } else {
+ break;
+ case IS_FALSE:
TRACE_APPEND_STR("false, ");
- }
break;
case IS_RESOURCE:
TRACE_APPEND_STR("Resource id #");
/* break; */
case IS_LONG: {
- long lval = Z_LVAL_PP(arg);
+ long lval = Z_LVAL_P(arg);
char s_tmp[MAX_LENGTH_OF_LONG + 1];
int l_tmp = zend_sprintf(s_tmp, "%ld", lval); /* SAFE */
TRACE_APPEND_STRL(s_tmp, l_tmp);
@@ -107,7 +107,7 @@ mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_
break;
}
case IS_DOUBLE: {
- double dval = Z_DVAL_PP(arg);
+ double dval = Z_DVAL_P(arg);
char *s_tmp;
int l_tmp;
@@ -123,15 +123,15 @@ mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_
TRACE_APPEND_STR("Array, ");
break;
case IS_OBJECT: {
- char *class_name;
- zend_uint class_name_len;
- int dupl;
+ zend_string *class_name;
+ /* see #67299, may be removed now */
+ int dupl = 0;
TRACE_APPEND_STR("Object(");
- dupl = zend_get_object_classname(*arg, (const char **)&class_name, &class_name_len TSRMLS_CC);
+ class_name = zend_get_object_classname(Z_OBJ_P(arg) TSRMLS_CC);
- TRACE_APPEND_STRL(class_name, class_name_len);
+ TRACE_APPEND_STRL(class_name->val, class_name->len);
if (!dupl) {
efree(class_name);
}
@@ -147,13 +147,13 @@ mysqlnd_build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_
/* }}} */
static int
-mysqlnd_build_trace_string(zval **frame TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
+mysqlnd_build_trace_string(zval *frame TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
{
char *s_tmp, **str;
int *len, *num;
long line;
- HashTable *ht = Z_ARRVAL_PP(frame);
- zval **file, **tmp;
+ HashTable *ht = Z_ARRVAL_P(frame);
+ zval *zfile, *tmp, *zline;
uint * level;
level = va_arg(args, uint *);
@@ -170,26 +170,27 @@ mysqlnd_build_trace_string(zval **frame TSRMLS_DC, int num_args, va_list args, z
sprintf(s_tmp, "#%d ", (*num)++);
TRACE_APPEND_STRL(s_tmp, strlen(s_tmp));
efree(s_tmp);
- if (zend_hash_find(ht, "file", sizeof("file"), (void**)&file) == SUCCESS) {
- if (zend_hash_find(ht, "line", sizeof("line"), (void**)&tmp) == SUCCESS) {
- line = Z_LVAL_PP(tmp);
+
+ if ((zfile = zend_hash_str_find(ht, "file", sizeof("file"))) != NULL) {
+ if ((zline = zend_hash_str_find(ht, "line", sizeof("line"))) != NULL) {
+ line = Z_LVAL_P(zline);
} else {
line = 0;
}
- s_tmp = emalloc(Z_STRLEN_PP(file) + MAX_LENGTH_OF_LONG + 4 + 1);
- sprintf(s_tmp, "%s(%ld): ", Z_STRVAL_PP(file), line);
+ s_tmp = emalloc(Z_STRLEN_P(zfile) + MAX_LENGTH_OF_LONG + 4 + 1);
+ sprintf(s_tmp, "%s(%ld): ", Z_STR_P(zfile)->val, line);
TRACE_APPEND_STRL(s_tmp, strlen(s_tmp));
efree(s_tmp);
} else {
TRACE_APPEND_STR("[internal function]: ");
}
- TRACE_APPEND_KEY("class");
- TRACE_APPEND_KEY("type");
- TRACE_APPEND_KEY("function");
+ trace_append_key(ht, "class");
+ trace_append_key(ht, "type");
+ trace_append_key(ht, "function");
TRACE_APPEND_CHR('(');
if (zend_hash_find(ht, "args", sizeof("args"), (void**)&tmp) == SUCCESS) {
int last_len = *len;
- zend_hash_apply_with_arguments(Z_ARRVAL_PP(tmp) TSRMLS_CC, (apply_func_args_t)mysqlnd_build_trace_args, 2, str, len);
+ zend_hash_apply_with_arguments(Z_ARRVAL_P(tmp) TSRMLS_CC, (apply_func_args_t)mysqlnd_build_trace_args, 2, str, len);
if (last_len != *len) {
*len -= 2; /* remove last ', ' */
}
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index f108012bbd..20b7a1ae31 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -751,7 +751,7 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
(flen == sizeof("is_callable")-1 && zend_binary_strcasecmp(fname, flen, "is_callable", sizeof("is_callable")-1) == 0)
) {
zend_function *function;
- if(zend_hash_find(EG(function_table), Z_STRVAL_P(arg), Z_STRLEN_P(arg)+1, (void **)&function) == SUCCESS) {
+ if((function = zend_hash_find_ptr(EG(function_table), Z_STR_P(arg))) != NULL) {
literal_dtor(arg);
MAKE_NOP(sv);
MAKE_NOP(fcall);
@@ -769,7 +769,7 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
ZEND_OP1_TYPE(opline) = IS_CONST;
}
} else if(flen == sizeof("extension_loaded")-1 && zend_binary_strcasecmp(fname, flen, "extension_loaded", sizeof("extension_loaded")-1) == 0) {
- if(zend_hash_exists(&module_registry, Z_STRVAL_P(arg), Z_STRLEN_P(arg)+1)) {
+ if(zend_hash_exists(&module_registry, Z_STR_P(arg))) {
literal_dtor(arg);
MAKE_NOP(sv);
MAKE_NOP(fcall);
diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c
index 80a75f5808..aad6243e0a 100644
--- a/ext/opcache/Optimizer/compact_literals.c
+++ b/ext/opcache/Optimizer/compact_literals.c
@@ -324,7 +324,7 @@ static void optimizer_compact_literals(zend_op_array *op_array TSRMLS_DC)
map[i] = l_true;
break;
case IS_LONG:
- if ((pos = zend_hash_index_find(&hash, Z_LVAL(op_array->literals[i]))) != 0) {
+ if ((pos = zend_hash_index_find(&hash, Z_LVAL(op_array->literals[i]))) != NULL) {
map[i] = Z_LVAL_P(pos);
} else {
map[i] = j;
@@ -338,7 +338,7 @@ static void optimizer_compact_literals(zend_op_array *op_array TSRMLS_DC)
}
break;
case IS_DOUBLE:
- if ((pos = zend_hash_str_find(&hash, (char*)&Z_DVAL(op_array->literals[i]), sizeof(double))) != 0) {
+ if ((pos = zend_hash_str_find(&hash, (char*)&Z_DVAL(op_array->literals[i]), sizeof(double))) != NULL) {
map[i] = Z_LVAL_P(pos);
} else {
map[i] = j;
@@ -375,7 +375,7 @@ static void optimizer_compact_literals(zend_op_array *op_array TSRMLS_DC)
key->h += info[i].flags;
}
if ((info[i].flags & LITERAL_MAY_MERGE) &&
- (pos = zend_hash_find(&hash, key)) != 0 &&
+ (pos = zend_hash_find(&hash, key)) != NULL &&
Z_TYPE(op_array->literals[i]) == Z_TYPE(op_array->literals[Z_LVAL_P(pos)]) &&
info[i].flags == info[Z_LVAL_P(pos)].flags) {
diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c
index 2ec3931907..ab41fa92f7 100644
--- a/ext/opcache/Optimizer/pass1_5.c
+++ b/ext/opcache/Optimizer/pass1_5.c
@@ -25,6 +25,9 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
case ZEND_MUL:
case ZEND_DIV:
case ZEND_MOD:
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+ case ZEND_POW:
+#endif
case ZEND_SL:
case ZEND_SR:
case ZEND_CONCAT:
diff --git a/ext/opcache/Optimizer/pass3.c b/ext/opcache/Optimizer/pass3.c
index fd2a190009..1ee641ca52 100644
--- a/ext/opcache/Optimizer/pass3.c
+++ b/ext/opcache/Optimizer/pass3.c
@@ -45,6 +45,9 @@ if (ZEND_OPTIMIZER_PASS_3 & OPTIMIZATION_LEVEL) {
case ZEND_MUL:
case ZEND_DIV:
case ZEND_MOD:
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+ case ZEND_POW:
+#endif
case ZEND_CONCAT:
case ZEND_SL:
case ZEND_SR:
@@ -104,6 +107,11 @@ if (ZEND_OPTIMIZER_PASS_3 & OPTIMIZATION_LEVEL) {
case ZEND_MOD:
opline->opcode = ZEND_ASSIGN_MOD;
break;
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+ case ZEND_POW:
+ opline->opcode = ZEND_ASSIGN_POW;
+ break;
+#endif
case ZEND_CONCAT:
opline->opcode = ZEND_ASSIGN_CONCAT;
break;
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index a26d32e58e..46e97a4dd0 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -93,7 +93,7 @@
#define PHP_5_3_X_API_NO 220090626
#define PHP_5_4_X_API_NO 220100525
#define PHP_5_5_X_API_NO 220121212
-#define PHP_5_6_X_API_NO 220131106
+#define PHP_5_6_X_API_NO 220131226
/*** file locking ***/
#ifndef ZEND_WIN32
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index 30818adb30..1f5ee3af48 100644
--- a/ext/opcache/zend_persist.c
+++ b/ext/opcache/zend_persist.c
@@ -668,10 +668,12 @@ static int zend_update_parent_ce(zval *zv TSRMLS_DC)
ce->__callstatic->op_array.refcount++;
}
#endif
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
if (ce->__debugInfo) {
ce->__debugInfo = zend_shared_alloc_get_xlat_entry(ce->__debugInfo);
ce->__debugInfo->op_array.refcount++;
}
+#endif
zend_hash_apply(&ce->properties_info, (apply_func_t) zend_update_property_info_ce TSRMLS_CC);
return 0;
}
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
index cf108991e5..b9b5044a8e 100644
--- a/ext/pdo/pdo_sql_parser.c
+++ b/ext/pdo/pdo_sql_parser.c
@@ -780,8 +780,9 @@ int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char
padding = 3;
}
if(params) {
+ HashPosition *param_pos;
zend_hash_internal_pointer_reset(params);
- while (SUCCESS == zend_hash_get_current_data(params, (void**)&param)) {
+ while ((param == zend_hash_get_current_data_ptr_ex(params, &param_pos)) != NULL) {
if(param->parameter) {
convert_to_string(param->parameter);
/* accommodate a string that needs to be fully quoted
@@ -813,9 +814,9 @@ int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char
}
/* lookup bind first via hash and then index */
/* stupid keys need to be null-terminated, even though we know their length */
- if((SUCCESS == zend_hash_find(params, s.tok, s.cur-s.tok,(void **)&param))
+ if((NULL != (param = zend_hash_str_find_ptr(params, s.tok, s.cur-s.tok))
||
- (SUCCESS == zend_hash_index_find(params, bindno, (void **)&param)))
+ NULL != (params = zend_hash_index_find_ptr(params, bindno)))
{
char *quotedstr;
int quotedstrlen;
@@ -852,7 +853,7 @@ int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char
return (int) (s.cur - inquery);
}
/* lookup bind by index */
- if(SUCCESS == zend_hash_index_find(params, bindno, (void **)&param))
+ if(NULL != (params = zend_hash_index_find_ptr(params, bindno)))
{
char *quotedstr;
int quotedstrlen;
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re
index 48d80e2684..be38dfd29c 100644
--- a/ext/pdo/pdo_sql_parser.re
+++ b/ext/pdo/pdo_sql_parser.re
@@ -422,8 +422,9 @@ int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char
padding = 3;
}
if(params) {
+ HashPosition *param_pos;
zend_hash_internal_pointer_reset(params);
- while (SUCCESS == zend_hash_get_current_data(params, (void**)&param)) {
+ while ((param == zend_hash_get_current_data_ptr_ex(params, &param_pos)) != NULL) {
if(param->parameter) {
convert_to_string(param->parameter);
/* accommodate a string that needs to be fully quoted
@@ -455,9 +456,9 @@ int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char
}
/* lookup bind first via hash and then index */
/* stupid keys need to be null-terminated, even though we know their length */
- if((SUCCESS == zend_hash_find(params, s.tok, s.cur-s.tok,(void **)&param))
+ if((NULL != (param = zend_hash_str_find_ptr(params, s.tok, s.cur-s.tok))
||
- (SUCCESS == zend_hash_index_find(params, bindno, (void **)&param)))
+ NULL != (params = zend_hash_index_find_ptr(params, bindno)))
{
char *quotedstr;
int quotedstrlen;
@@ -494,7 +495,7 @@ int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char
return (int) (s.cur - inquery);
}
/* lookup bind by index */
- if(SUCCESS == zend_hash_index_find(params, bindno, (void **)&param))
+ if(NULL != (params = zend_hash_index_find_ptr(params, bindno)))
{
char *quotedstr;
int quotedstrlen;
diff --git a/ext/phar/stream.c b/ext/phar/stream.c
index 51726999e2..5aa6aa43ea 100644
--- a/ext/phar/stream.c
+++ b/ext/phar/stream.c
@@ -892,18 +892,15 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from
/* Rename directory. Update all nested paths */
if (is_dir) {
- int key_type;
+ Bucket *b;
zend_string *str_key;
zend_string *new_str_key;
- ulong unused;
uint from_len = strlen(resource_from->path+1);
uint to_len = strlen(resource_to->path+1);
- for (zend_hash_internal_pointer_reset(&phar->manifest);
- HASH_KEY_NON_EXISTENT != (key_type = zend_hash_get_current_key_ex(&phar->manifest, &str_key, &unused, 0, &phar->manifest.nInternalPointer)) &&
- NULL != (entry = zend_hash_get_current_data_ptr(&phar->manifest));
- zend_hash_move_forward(&phar->manifest)
- ) {
+ ZEND_HASH_FOREACH_BUCKET(&phar->manifest, b) {
+ str_key = b->key;
+ entry = Z_PTR(b->val);
if (!entry->is_deleted &&
str_key->len > from_len &&
memcmp(str_key->val, resource_from->path+1, from_len) == 0 &&
@@ -921,15 +918,15 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from
entry->filename = estrndup(new_str_key->val, new_str_key->len);
entry->filename_len = new_str_key->len;
- zend_hash_update_current_key_ex(&phar->manifest, key_type, new_str_key, 0, HASH_UPDATE_KEY_ANYWAY);
- STR_RELEASE(new_str_key);
+ STR_RELEASE(str_key);
+ b->h = STR_HASH_VAL(new_str_key);
+ b->key = new_str_key;
}
- }
+ } ZEND_HASH_FOREACH_END();
+ zend_hash_rehash(&phar->manifest);
- for (zend_hash_internal_pointer_reset(&phar->virtual_dirs);
- HASH_KEY_NON_EXISTENT != (key_type = zend_hash_get_current_key_ex(&phar->virtual_dirs, &str_key, &unused, 0, &phar->virtual_dirs.nInternalPointer));
- zend_hash_move_forward(&phar->virtual_dirs)
- ) {
+ ZEND_HASH_FOREACH_BUCKET(&phar->virtual_dirs, b) {
+ str_key = b->key;
if (str_key->len >= from_len &&
memcmp(str_key->val, resource_from->path+1, from_len) == 0 &&
(str_key->len == from_len || IS_SLASH(str_key->val[from_len]))) {
@@ -939,16 +936,15 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from
memcpy(new_str_key->val + to_len, str_key->val + from_len, str_key->len - from_len);
new_str_key->val[new_str_key->len] = 0;
- zend_hash_update_current_key_ex(&phar->virtual_dirs, key_type, new_str_key, 0, HASH_UPDATE_KEY_ANYWAY);
- STR_RELEASE(new_str_key);
+ STR_RELEASE(str_key);
+ b->h = STR_HASH_VAL(new_str_key);
+ b->key = new_str_key;
}
- }
+ } ZEND_HASH_FOREACH_END();
+ zend_hash_rehash(&phar->virtual_dirs);
- for (zend_hash_internal_pointer_reset(&phar->mounted_dirs);
- HASH_KEY_NON_EXISTENT != (key_type = zend_hash_get_current_key_ex(&phar->mounted_dirs, &str_key, &unused, 0, &phar->mounted_dirs.nInternalPointer)) &&
- NULL != (entry = zend_hash_get_current_data_ptr(&phar->mounted_dirs));
- zend_hash_move_forward(&phar->mounted_dirs)
- ) {
+ ZEND_HASH_FOREACH_BUCKET(&phar->mounted_dirs, b) {
+ str_key = b->key;
if (str_key->len >= from_len &&
memcmp(str_key->val, resource_from->path+1, from_len) == 0 &&
(str_key->len == from_len || IS_SLASH(str_key->val[from_len]))) {
@@ -958,10 +954,12 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from
memcpy(new_str_key->val + to_len, str_key->val + from_len, str_key->len - from_len);
new_str_key->val[new_str_key->len] = 0;
- zend_hash_update_current_key_ex(&phar->mounted_dirs, key_type, new_str_key, 0, HASH_UPDATE_KEY_ANYWAY);
- STR_RELEASE(new_str_key);
+ STR_RELEASE(str_key);
+ b->h = STR_HASH_VAL(new_str_key);
+ b->key = new_str_key;
}
- }
+ } ZEND_HASH_FOREACH_END();
+ zend_hash_rehash(&phar->mounted_dirs);
}
if (is_modified) {
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 1368853d66..4d260a4c13 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -1937,10 +1937,9 @@ void phar_add_virtual_dirs(phar_archive_data *phar, char *filename, int filename
}
/* }}} */
-static int phar_update_cached_entry(zval *data, void *argument) /* {{{ */
+static int phar_update_cached_entry(zval *data, void *argument TSRMLS_DC) /* {{{ */
{
phar_entry_info *entry = (phar_entry_info *)Z_PTR_P(data);
- TSRMLS_FETCH();
entry->phar = (phar_archive_data *)argument;
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 3af1caabea..22b727b6a4 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -59,11 +59,11 @@ PHP_FUNCTION(readline_callback_handler_remove);
PHP_FUNCTION(readline_redisplay);
PHP_FUNCTION(readline_on_new_line);
-static zval *_prepped_callback = NULL;
+static zval _prepped_callback;
#endif
-static zval *_readline_completion = NULL;
+static zval _readline_completion;
static zval _readline_array;
PHP_MINIT_FUNCTION(readline);
@@ -172,9 +172,13 @@ PHP_MINIT_FUNCTION(readline)
{
#if HAVE_LIBREADLINE
/* libedit don't need this call which set the tty in cooked mode */
- using_history();
+ using_history();
+#endif
+ ZVAL_UNDEF(&_readline_completion);
+#if HAVE_RL_CALLBACK_READ_CHAR
+ ZVAL_UNDEF(&_prepped_callback);
#endif
- return PHP_MINIT(cli_readline)(INIT_FUNC_ARGS_PASSTHRU);
+ return PHP_MINIT(cli_readline)(INIT_FUNC_ARGS_PASSTHRU);
}
PHP_MSHUTDOWN_FUNCTION(readline)
@@ -184,15 +188,13 @@ PHP_MSHUTDOWN_FUNCTION(readline)
PHP_RSHUTDOWN_FUNCTION(readline)
{
- if (_readline_completion) {
- zval_dtor(_readline_completion);
- FREE_ZVAL(_readline_completion);
- }
+ zval_dtor(&_readline_completion);
+ ZVAL_UNDEF(&_readline_completion);
#if HAVE_RL_CALLBACK_READ_CHAR
- if (_prepped_callback) {
+ if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
rl_callback_handler_remove();
zval_ptr_dtor(&_prepped_callback);
- _prepped_callback = 0;
+ ZVAL_UNDEF(&_prepped_callback);
}
#endif
@@ -223,7 +225,7 @@ PHP_FUNCTION(readline)
if (! result) {
RETURN_FALSE;
} else {
- RETVAL_STRING(result,1);
+ RETVAL_STRING(result);
free(result);
}
}
@@ -237,11 +239,11 @@ PHP_FUNCTION(readline)
PHP_FUNCTION(readline_info)
{
char *what = NULL;
- zval **value = NULL;
+ zval *value = NULL;
int what_len, oldval;
char *oldstr;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sZ", &what, &what_len, &value) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sz", &what, &what_len, &value) == FAILURE) {
return;
}
@@ -269,9 +271,9 @@ PHP_FUNCTION(readline_info)
if (value) {
/* XXX if (rl_line_buffer) free(rl_line_buffer); */
convert_to_string_ex(value);
- rl_line_buffer = strdup(Z_STRVAL_PP(value));
+ rl_line_buffer = strdup(Z_STRVAL_P(value));
}
- RETVAL_STRING(SAFE_STRING(oldstr),1);
+ RETVAL_STRING(SAFE_STRING(oldstr));
} else if (!strcasecmp(what, "point")) {
RETVAL_LONG(rl_point);
} else if (!strcasecmp(what, "end")) {
@@ -283,20 +285,20 @@ PHP_FUNCTION(readline_info)
oldval = rl_done;
if (value) {
convert_to_long_ex(value);
- rl_done = Z_LVAL_PP(value);
+ rl_done = Z_LVAL_P(value);
}
RETVAL_LONG(oldval);
} else if (!strcasecmp(what, "pending_input")) {
oldval = rl_pending_input;
if (value) {
convert_to_string_ex(value);
- rl_pending_input = Z_STRVAL_PP(value)[0];
+ rl_pending_input = Z_STRVAL_P(value)[0];
}
RETVAL_LONG(oldval);
} else if (!strcasecmp(what, "prompt")) {
- RETVAL_STRING(SAFE_STRING(rl_prompt),1);
+ RETVAL_STRING(SAFE_STRING(rl_prompt));
} else if (!strcasecmp(what, "terminal_name")) {
- RETVAL_STRING((char *)SAFE_STRING(rl_terminal_name),1);
+ RETVAL_STRING((char *)SAFE_STRING(rl_terminal_name));
#endif
#if HAVE_ERASE_EMPTY_LINE
} else if (!strcasecmp(what, "erase_empty_line")) {
@@ -308,20 +310,20 @@ PHP_FUNCTION(readline_info)
RETVAL_LONG(oldval);
#endif
} else if (!strcasecmp(what,"library_version")) {
- RETVAL_STRING((char *)SAFE_STRING(rl_library_version),1);
+ RETVAL_STRING((char *)SAFE_STRING(rl_library_version));
} else if (!strcasecmp(what, "readline_name")) {
oldstr = (char*)rl_readline_name;
if (value) {
/* XXX if (rl_readline_name) free(rl_readline_name); */
convert_to_string_ex(value);
- rl_readline_name = strdup(Z_STRVAL_PP(value));;
+ rl_readline_name = strdup(Z_STRVAL_P(value));;
}
- RETVAL_STRING(SAFE_STRING(oldstr),1);
+ RETVAL_STRING(SAFE_STRING(oldstr));
} else if (!strcasecmp(what, "attempted_completion_over")) {
oldval = rl_attempted_completion_over;
if (value) {
convert_to_long_ex(value);
- rl_attempted_completion_over = Z_LVAL_PP(value);
+ rl_attempted_completion_over = Z_LVAL_P(value);
}
RETVAL_LONG(oldval);
}
@@ -442,63 +444,50 @@ PHP_FUNCTION(readline_write_history)
static char *_readline_command_generator(const char *text, int state)
{
HashTable *myht = Z_ARRVAL(_readline_array);
- zval **entry;
+ zval *entry;
if (!state) {
zend_hash_internal_pointer_reset(myht);
}
- while (zend_hash_get_current_data(myht, (void **)&entry) == SUCCESS) {
+ while ((entry = zend_hash_get_current_data(myht)) != NULL) {
zend_hash_move_forward(myht);
convert_to_string_ex(entry);
- if (strncmp (Z_STRVAL_PP(entry), text, strlen(text)) == 0) {
- return (strdup(Z_STRVAL_PP(entry)));
+ if (strncmp (Z_STRVAL_P(entry), text, strlen(text)) == 0) {
+ return (strdup(Z_STRVAL_P(entry)));
}
}
return NULL;
}
-static zval *_readline_string_zval(const char *str)
+static void _readline_string_zval(zval *ret, const char *str)
{
- zval *ret;
- int len;
-
- MAKE_STD_ZVAL(ret);
-
if (str) {
- len = strlen(str);
- ZVAL_STRINGL(ret, (char*)str, len, 1);
+ ZVAL_STRING(ret, (char*)str);
} else {
ZVAL_NULL(ret);
}
-
- return ret;
}
-static zval *_readline_long_zval(long l)
+static void _readline_long_zval(zval *ret, long l)
{
- zval *ret;
- MAKE_STD_ZVAL(ret);
-
- Z_TYPE_P(ret) = IS_LONG;
- Z_LVAL_P(ret) = l;
- return ret;
+ ZVAL_LONG(ret, l);
}
static char **_readline_completion_cb(const char *text, int start, int end)
{
- zval *params[3];
+ zval params[3];
int i;
char **matches = NULL;
TSRMLS_FETCH();
- params[0]=_readline_string_zval(text);
- params[1]=_readline_long_zval(start);
- params[2]=_readline_long_zval(end);
+ _readline_string_zval(&params[0], text);
+ _readline_long_zval(&params[1], start);
+ _readline_long_zval(&params[2], end);
- if (call_user_function(CG(function_table), NULL, _readline_completion, &_readline_array, 3, params TSRMLS_CC) == SUCCESS) {
+ if (call_user_function(CG(function_table), NULL, &_readline_completion, &_readline_array, 3, params TSRMLS_CC) == SUCCESS) {
if (Z_TYPE(_readline_array) == IS_ARRAY) {
if (zend_hash_num_elements(Z_ARRVAL(_readline_array))) {
matches = rl_completion_matches(text,_readline_command_generator);
@@ -524,31 +513,24 @@ static char **_readline_completion_cb(const char *text, int start, int end)
PHP_FUNCTION(readline_completion_function)
{
zval *arg = NULL;
- char *name = NULL;
+ zend_string *name = NULL;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg)) {
RETURN_FALSE;
}
if (!zend_is_callable(arg, 0, &name TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not callable", name);
- efree(name);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not callable", name->val);
+ STR_RELEASE(name);
RETURN_FALSE;
}
- efree(name);
-
- if (_readline_completion) {
- zval_dtor(_readline_completion);
- FREE_ZVAL(_readline_completion);
- }
+ STR_RELEASE(name);
- MAKE_STD_ZVAL(_readline_completion);
- *_readline_completion = *arg;
- zval_copy_ctor(_readline_completion);
+ zval_dtor(&_readline_completion);
+ ZVAL_DUP(&_readline_completion, arg);
rl_attempted_completion_function = _readline_completion_cb;
if (rl_attempted_completion_function == NULL) {
- efree(name);
RETURN_FALSE;
}
RETURN_TRUE;
@@ -560,15 +542,15 @@ PHP_FUNCTION(readline_completion_function)
static void php_rl_callback_handler(char *the_line)
{
- zval *params[1];
+ zval params[1];
zval dummy;
TSRMLS_FETCH();
ZVAL_NULL(&dummy);
- params[0] = _readline_string_zval(the_line);
+ _readline_string_zval(&params[0], the_line);
- call_user_function(CG(function_table), NULL, _prepped_callback, &dummy, 1, params TSRMLS_CC);
+ call_user_function(CG(function_table), NULL, &_prepped_callback, &dummy, 1, params TSRMLS_CC);
zval_ptr_dtor(&params[0]);
zval_dtor(&dummy);
@@ -579,7 +561,7 @@ static void php_rl_callback_handler(char *the_line)
PHP_FUNCTION(readline_callback_handler_install)
{
zval *callback;
- char *name = NULL;
+ zend_string *name = NULL;
char *prompt;
int prompt_len;
@@ -588,20 +570,18 @@ PHP_FUNCTION(readline_callback_handler_install)
}
if (!zend_is_callable(callback, 0, &name TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not callable", name);
- efree(name);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not callable", name->val);
+ STR_RELEASE(name);
RETURN_FALSE;
}
- efree(name);
+ STR_RELEASE(name);
- if (_prepped_callback) {
+ if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
rl_callback_handler_remove();
- zval_dtor(_prepped_callback);
- FREE_ZVAL(_prepped_callback);
+ zval_dtor(&_prepped_callback);
}
- ALLOC_ZVAL(_prepped_callback);
- MAKE_COPY_ZVAL(&callback, _prepped_callback);
+ ZVAL_DUP(&_prepped_callback, callback);
rl_callback_handler_install(prompt, php_rl_callback_handler);
@@ -613,7 +593,7 @@ PHP_FUNCTION(readline_callback_handler_install)
Informs the readline callback interface that a character is ready for input */
PHP_FUNCTION(readline_callback_read_char)
{
- if (_prepped_callback) {
+ if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
rl_callback_read_char();
}
}
@@ -623,11 +603,10 @@ PHP_FUNCTION(readline_callback_read_char)
Removes a previously installed callback handler and restores terminal settings */
PHP_FUNCTION(readline_callback_handler_remove)
{
- if (_prepped_callback) {
+ if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
rl_callback_handler_remove();
- zval_dtor(_prepped_callback);
- FREE_ZVAL(_prepped_callback);
- _prepped_callback = 0;
+ zval_dtor(&_prepped_callback);
+ ZVAL_UNDEF(&_prepped_callback);
RETURN_TRUE;
}
RETURN_FALSE;
diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c
index c2bf8764cb..c94c245071 100644
--- a/ext/readline/readline_cli.c
+++ b/ext/readline/readline_cli.c
@@ -131,7 +131,7 @@ typedef enum {
outside,
} php_code_type;
-static char *cli_get_prompt(char *block, char prompt TSRMLS_DC) /* {{{ */
+static zend_string *cli_get_prompt(char *block, char prompt TSRMLS_DC) /* {{{ */
{
smart_str retval = {0};
char *prompt_spec = CLIR_G(prompt) ? CLIR_G(prompt) : DEFAULT_PROMPT;
@@ -197,11 +197,11 @@ static char *cli_get_prompt(char *block, char prompt TSRMLS_DC) /* {{{ */
}
} while (++prompt_spec && *prompt_spec);
smart_str_0(&retval);
- return retval.c;
+ return retval.s;
}
/* }}} */
-static int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{{ */
+static int cli_is_valid_code(char *code, int len, zend_string **prompt TSRMLS_DC) /* {{{ */
{
int valid_end = 1, last_valid_end;
int brackets_count = 0;
@@ -405,7 +405,7 @@ static int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{
static char *cli_completion_generator_ht(const char *text, int textlen, int *state, HashTable *ht, void **pData TSRMLS_DC) /* {{{ */
{
- char *name;
+ zend_string *name;
ulong number;
if (!(*state % 2)) {
@@ -414,12 +414,12 @@ static char *cli_completion_generator_ht(const char *text, int textlen, int *sta
}
while(zend_hash_has_more_elements(ht) == SUCCESS) {
zend_hash_get_current_key(ht, &name, &number, 0);
- if (!textlen || !strncmp(name, text, textlen)) {
+ if (!textlen || !strncmp(name->val, text, textlen)) {
if (pData) {
- zend_hash_get_current_data(ht, pData);
+ *pData = zend_hash_get_current_data_ptr(ht);
}
zend_hash_move_forward(ht);
- return name;
+ return name->val;
}
if (zend_hash_move_forward(ht) == FAILURE) {
break;
@@ -433,7 +433,7 @@ static char *cli_completion_generator_var(const char *text, int textlen, int *st
{
char *retval, *tmp;
- tmp = retval = cli_completion_generator_ht(text + 1, textlen - 1, state, EG(active_symbol_table), NULL TSRMLS_CC);
+ tmp = retval = cli_completion_generator_ht(text + 1, textlen - 1, state, EG(active_symbol_table) ? &EG(active_symbol_table)->ht : NULL, NULL TSRMLS_CC);
if (retval) {
retval = malloc(strlen(tmp) + 2);
retval[0] = '$';
@@ -463,7 +463,7 @@ static char *cli_completion_generator_func(const char *text, int textlen, int *s
char *retval = cli_completion_generator_ht(text, textlen, state, ht, (void**)&func TSRMLS_CC);
if (retval) {
rl_completion_append_character = '(';
- retval = strdup(func->common.function_name);
+ retval = strdup(func->common.function_name->val);
}
return retval;
@@ -471,11 +471,11 @@ static char *cli_completion_generator_func(const char *text, int textlen, int *s
static char *cli_completion_generator_class(const char *text, int textlen, int *state TSRMLS_DC) /* {{{ */
{
- zend_class_entry **pce;
- char *retval = cli_completion_generator_ht(text, textlen, state, EG(class_table), (void**)&pce TSRMLS_CC);
+ zend_class_entry *ce;
+ char *retval = cli_completion_generator_ht(text, textlen, state, EG(class_table), (void**)&ce TSRMLS_CC);
if (retval) {
rl_completion_append_character = '\0';
- retval = strdup((*pce)->name);
+ retval = strdup(ce->name->val);
}
return retval;
@@ -518,17 +518,18 @@ TODO:
} else if (text[0] == '#') {
retval = cli_completion_generator_ini(text, textlen, &cli_completion_state TSRMLS_CC);
} else {
- char *lc_text, *class_name, *class_name_end;
+ char *lc_text, *class_name_end;
int class_name_len;
- zend_class_entry **pce = NULL;
+ zend_string *class_name;
+ zend_class_entry *ce = NULL;
class_name_end = strstr(text, "::");
if (class_name_end) {
class_name_len = class_name_end - text;
- class_name = zend_str_tolower_dup(text, class_name_len);
- class_name[class_name_len] = '\0'; /* not done automatically */
- if (zend_lookup_class(class_name, class_name_len, &pce TSRMLS_CC)==FAILURE) {
- efree(class_name);
+ class_name = STR_ALLOC(class_name_len, 0);
+ zend_str_tolower_copy(class_name->val, text, class_name_len);
+ if ((ce = zend_lookup_class(class_name TSRMLS_CC)) == NULL) {
+ STR_RELEASE(class_name);
return NULL;
}
lc_text = zend_str_tolower_dup(class_name_end + 2, textlen - 2 - class_name_len);
@@ -540,14 +541,14 @@ TODO:
switch (cli_completion_state) {
case 0:
case 1:
- retval = cli_completion_generator_func(lc_text, textlen, &cli_completion_state, pce ? &(*pce)->function_table : EG(function_table) TSRMLS_CC);
+ retval = cli_completion_generator_func(lc_text, textlen, &cli_completion_state, ce ? &ce->function_table : EG(function_table) TSRMLS_CC);
if (retval) {
break;
}
case 2:
case 3:
- retval = cli_completion_generator_define(text, textlen, &cli_completion_state, pce ? &(*pce)->constants_table : EG(zend_constants) TSRMLS_CC);
- if (retval || pce) {
+ retval = cli_completion_generator_define(text, textlen, &cli_completion_state, ce ? &ce->constants_table : EG(zend_constants) TSRMLS_CC);
+ if (retval || ce) {
break;
}
case 4:
@@ -559,13 +560,13 @@ TODO:
}
efree(lc_text);
if (class_name_end) {
- efree(class_name);
+ STR_RELEASE(class_name);
}
- if (pce && retval) {
+ if (ce && retval) {
int len = class_name_len + 2 + strlen(retval) + 1;
char *tmp = malloc(len);
- snprintf(tmp, len, "%s::%s", (*pce)->name, retval);
+ snprintf(tmp, len, "%s::%s", ce->name->val, retval);
free(retval);
retval = tmp;
}
@@ -585,7 +586,7 @@ static int readline_shell_run(TSRMLS_D) /* {{{ */
char *line;
size_t size = 4096, pos = 0, len;
char *code = emalloc(size);
- char *prompt = cli_get_prompt("php", '>' TSRMLS_CC);
+ zend_string *prompt = cli_get_prompt("php", '>' TSRMLS_CC);
char *history_file;
if (PG(auto_prepend_file) && PG(auto_prepend_file)[0]) {
@@ -607,7 +608,7 @@ static int readline_shell_run(TSRMLS_D) /* {{{ */
read_history(history_file);
EG(exit_status) = 0;
- while ((line = readline(prompt)) != NULL) {
+ while ((line = readline(prompt->val)) != NULL) {
if (strcmp(line, "exit") == 0 || strcmp(line, "quit") == 0) {
free(line);
break;
@@ -623,17 +624,15 @@ static int readline_shell_run(TSRMLS_D) /* {{{ */
if (line[0] == '#') {
char *param = strstr(&line[1], "=");
if (param) {
- char *cmd;
- uint cmd_len;
+ zend_string *cmd;
param++;
- cmd_len = param - &line[1] - 1;
- cmd = estrndup(&line[1], cmd_len);
+ cmd = STR_INIT(&line[1], param - &line[1] - 1, 0);
- zend_alter_ini_entry_ex(cmd, cmd_len + 1, param, strlen(param), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
- efree(cmd);
+ zend_alter_ini_entry_ex(cmd, param, strlen(param), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
+ STR_RELEASE(cmd);
add_history(line);
- efree(prompt);
+ STR_RELEASE(prompt);
/* TODO: This might be wrong! */
prompt = cli_get_prompt("php", '>' TSRMLS_CC);
continue;
@@ -654,7 +653,7 @@ static int readline_shell_run(TSRMLS_D) /* {{{ */
}
free(line);
- efree(prompt);
+ STR_RELEASE(prompt);
if (!cli_is_valid_code(code, pos, &prompt TSRMLS_CC)) {
continue;
@@ -684,7 +683,7 @@ static int readline_shell_run(TSRMLS_D) /* {{{ */
write_history(history_file);
free(history_file);
efree(code);
- efree(prompt);
+ STR_RELEASE(prompt);
return EG(exit_status);
}
/* }}} */
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index dd9361b34e..2c2b0fa555 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -121,7 +121,9 @@ static void ps_files_close(ps_files *data)
static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
{
char buf[MAXPATHLEN];
+#ifdef O_NOFOLLOW
struct stat sbuf;
+#endif
if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) {
if (data->lastkey) {
diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c
index 5b57124cb8..901972da36 100644
--- a/ext/sockets/sendrecvmsg.c
+++ b/ext/sockets/sendrecvmsg.c
@@ -326,7 +326,7 @@ int php_do_setsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname,
#ifdef IPV6_PKTINFO
case IPV6_PKTINFO:
#ifdef PHP_WIN32
- if (Z_TYPE_PP(arg4) == IS_ARRAY) {
+ if (Z_TYPE_P(arg4) == IS_ARRAY) {
php_error_docref0(NULL TSRMLS_CC, E_WARNING, "Windows does not "
"support sticky IPV6_PKTINFO");
return FAILURE;
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index f83004428e..5c873f36a4 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -638,7 +638,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
if (!Z_ISUNDEF(rv) && zend_is_true(&rv TSRMLS_CC)) {
zval_ptr_dtor(&rv);
- if (check_empty == 2) {
+ if (check_empty != 1) {
return 1;
} else if (intern->fptr_offset_get) {
value = spl_array_read_dimension_ex(1, object, offset, BP_VAR_R, &rv TSRMLS_CC);
@@ -662,6 +662,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
return 0;
}
break;
+
case IS_DOUBLE:
index = (long)Z_DVAL_P(offset);
goto num_index;
@@ -685,28 +686,20 @@ num_index:
return 0;
}
break;
+
default:
zend_error(E_WARNING, "Illegal offset type");
return 0;
}
- if (check_inherited && intern->fptr_offset_get) {
+ if (check_empty && check_inherited && intern->fptr_offset_get) {
value = spl_array_read_dimension_ex(1, object, offset, BP_VAR_R, &rv TSRMLS_CC);
} else {
value = tmp;
}
}
- switch (check_empty) {
- case 0:
- return Z_TYPE_P(value) != IS_NULL;
- case 2:
- return 1;
- case 1:
- return zend_is_true(value TSRMLS_CC);
- }
-
- return 0;
+ return check_empty ? zend_is_true(value TSRMLS_CC) : Z_TYPE_P(value) != IS_NULL;
} /* }}} */
static int spl_array_has_dimension(zval *object, zval *offset, int check_empty TSRMLS_DC) /* {{{ */
diff --git a/ext/spl/tests/bug66834.phpt b/ext/spl/tests/bug66834.phpt
index 6d944b274a..66686c771a 100644
--- a/ext/spl/tests/bug66834.phpt
+++ b/ext/spl/tests/bug66834.phpt
@@ -75,14 +75,13 @@ var_dump($object->offsetexists('qux'), isset($object['qux']), empty($object['qux
echo "==== class with offsetGet() and offsetSet() ====\n";
$object = new ArrayObjectGetSet;
$object['foo'] = 42;
-var_dump($object->offsetExists('foo'), $object->offsetExists('sbb'), isset($object['foo']), isset($object['sbb']));
+var_dump($object->offsetExists('foo'), $object->offsetExists('sbb'), isset($object['foo']), isset($object['sbb']), empty($object['sbb']));
?>
--EXPECTF--
==== class with offsetExists() and offsetGet() ====
string(37) "Called: ArrayObjectBoth::offsetExists"
string(37) "Called: ArrayObjectBoth::offsetExists"
-string(34) "Called: ArrayObjectBoth::offsetGet"
string(37) "Called: ArrayObjectBoth::offsetExists"
string(34) "Called: ArrayObjectBoth::offsetGet"
bool(true)
@@ -90,15 +89,13 @@ bool(true)
bool(true)
string(37) "Called: ArrayObjectBoth::offsetExists"
string(37) "Called: ArrayObjectBoth::offsetExists"
-string(34) "Called: ArrayObjectBoth::offsetGet"
string(37) "Called: ArrayObjectBoth::offsetExists"
string(34) "Called: ArrayObjectBoth::offsetGet"
bool(true)
-bool(false)
+bool(true)
bool(true)
string(37) "Called: ArrayObjectBoth::offsetExists"
string(37) "Called: ArrayObjectBoth::offsetExists"
-string(34) "Called: ArrayObjectBoth::offsetGet"
string(37) "Called: ArrayObjectBoth::offsetExists"
string(34) "Called: ArrayObjectBoth::offsetGet"
bool(true)
@@ -121,7 +118,7 @@ string(39) "Called: ArrayObjectExists::offsetExists"
string(39) "Called: ArrayObjectExists::offsetExists"
string(39) "Called: ArrayObjectExists::offsetExists"
bool(true)
-bool(false)
+bool(true)
bool(true)
string(39) "Called: ArrayObjectExists::offsetExists"
string(39) "Called: ArrayObjectExists::offsetExists"
@@ -137,17 +134,14 @@ bool(false)
bool(true)
==== class with offsetGet() ====
string(33) "Called: ArrayObjectGet::offsetGet"
-string(33) "Called: ArrayObjectGet::offsetGet"
bool(true)
bool(true)
bool(true)
string(33) "Called: ArrayObjectGet::offsetGet"
-string(33) "Called: ArrayObjectGet::offsetGet"
bool(true)
bool(false)
bool(true)
string(33) "Called: ArrayObjectGet::offsetGet"
-string(33) "Called: ArrayObjectGet::offsetGet"
bool(true)
bool(true)
bool(false)
@@ -160,4 +154,5 @@ Notice: Undefined index: foo in %s on line %d
bool(false)
bool(true)
bool(false)
-bool(false)
+bool(true)
+bool(true)
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index 2df16daaac..cea43dd8d3 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -331,6 +331,9 @@ PHP_FUNCTION(iptcparse)
recnum = buffer[ inx++ ];
if (buffer[ inx ] & (unsigned char) 0x80) { /* long tag */
+ if((inx+6) >= str_len) {
+ break;
+ }
len = (((long) buffer[ inx + 2 ]) << 24) + (((long) buffer[ inx + 3 ]) << 16) +
(((long) buffer[ inx + 4 ]) << 8) + (((long) buffer[ inx + 5 ]));
inx += 6;
diff --git a/ext/standard/tests/image/bug67250.phpt b/ext/standard/tests/image/bug67250.phpt
new file mode 100644
index 0000000000..607de9f3b6
--- /dev/null
+++ b/ext/standard/tests/image/bug67250.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #67250 (iptcparse out-of-bounds read)
+--FILE--
+<?php
+var_dump(iptcparse("\x1C\x02_\x80___"));
+?>
+--EXPECT--
+bool(false)
diff --git a/ext/standard/tests/strings/bug67252.phpt b/ext/standard/tests/strings/bug67252.phpt
new file mode 100644
index 0000000000..80a6ebcf1c
--- /dev/null
+++ b/ext/standard/tests/strings/bug67252.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #67252 (convert_uudecode out-of-bounds read)
+--FILE--
+<?php
+
+$a = "M86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A"."\n"."a.";
+var_dump(convert_uudecode($a));
+
+?>
+--EXPECTF--
+
+Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
+bool(false)
diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c
index 2a1de6ed46..0689de5636 100644
--- a/ext/standard/uuencode.c
+++ b/ext/standard/uuencode.c
@@ -156,6 +156,9 @@ PHPAPI zend_string *php_uudecode(char *src, int src_len) /* {{{ */
}
while (s < ee) {
+ if(s+4 > e) {
+ goto err;
+ }
*p++ = PHP_UU_DEC(*s) << 2 | PHP_UU_DEC(*(s + 1)) >> 4;
*p++ = PHP_UU_DEC(*(s + 1)) << 4 | PHP_UU_DEC(*(s + 2)) >> 2;
*p++ = PHP_UU_DEC(*(s + 2)) << 6 | PHP_UU_DEC(*(s + 3));
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 8cba814f5e..fa46cf2ee7 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -762,8 +762,7 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
if ((d = zend_hash_find(propers, priv_name)) != NULL) {
if (Z_TYPE_P(d) == IS_INDIRECT) {
d = Z_INDIRECT_P(d);
- if (Z_TYPE_P(d) == IS_UNDEF) {
- STR_FREE(prot_name);
+ if (Z_ISUNDEF_P(d)) {
break;
}
}
diff --git a/main/streams/transports.c b/main/streams/transports.c
index 7ede9407e6..4f4832df2d 100644
--- a/main/streams/transports.c
+++ b/main/streams/transports.c
@@ -58,7 +58,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in
STREAMS_DC TSRMLS_DC)
{
php_stream *stream = NULL;
- php_stream_transport_factory factory;
+ php_stream_transport_factory factory = NULL;
const char *p, *protocol = NULL;
int n = 0, failed = 0;
char *error_text = NULL;
diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c
index 7c50b9e6a8..6de4b3ab36 100644
--- a/sapi/apache2filter/apache_config.c
+++ b/sapi/apache2filter/apache_config.c
@@ -137,7 +137,7 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
zend_hash_move_forward(&d->config)) {
pe = NULL;
zend_hash_get_current_data(&d->config, (void **) &data);
- if (zend_hash_find(&n->config, str, str_len, (void **) &pe) == SUCCESS) {
+ if ((pe = zend_hash_find(&n->config, str, str_len) != NULL) != NULL) {
if (pe->status >= data->status) continue;
}
zend_hash_update(&n->config, str, str_len, data, sizeof(*data), NULL);
@@ -152,7 +152,7 @@ char *get_php_config(void *conf, char *name, size_t name_len)
php_conf_rec *d = conf;
php_dir_entry *pe;
- if (zend_hash_find(&d->config, name, name_len, (void **) &pe) == SUCCESS) {
+ if ((pe = zend_hash_find(&d->config, name, name_len)) != NULL) {
return pe->value;
}