Compare commits

...
Author SHA1 Message Date
Julien Pauli 8f155eae86 5.5.11 final 2014-04-01 14:32:03 +02:00
Remi Collet c11d5ae290 Fixed bug #66946 extensive backtracking in awk rule regular expression
CVE-2013-7345

Applied upstream patch:
https://github.com/file/file/commit/ef2329cf71acb59204dd981e2c6cce6c81fe467c

Add the magicdata.patch to track patches applied to upstream data file.
2014-04-01 12:53:54 +02:00
Remi Collet 080d463a76 Fixed bug #66946 extensive backtracking in awk rule regular expression
CVE-2013-7345

Applied upstream patch:
https://github.com/file/file/commit/ef2329cf71acb59204dd981e2c6cce6c81fe467c

Add the magicdata.patch to track patches applied to upstream data file.
2014-04-01 12:53:31 +02:00
Julien Pauli 079548829f 5.5.11RC1 2014-03-19 11:17:08 +01:00
Stanislav Malyshev 1ff28cd0ec Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  prep for 5.4.27 rc1

Conflicts:
	configure.in
	main/php_version.h
2014-03-18 23:24:09 -07:00
Stanislav Malyshev 9b88bc494e prep for 5.4.27 rc1 2014-03-18 23:19:09 -07:00
Derick Rethans 2dfb8fbdf4 Merge branch 'PHP-5.4' into PHP-5.5 2014-03-18 14:48:56 +00:00
Derick Rethans b30304fb78 - Updated to version 2014.1 (2014a) 2014-03-18 14:48:55 +00:00
Andrey Hristov 2b811a5aec Add a test 2014-03-18 15:42:38 +02:00
Mateusz Kocielski 156cc39e21 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed off-by-one in php_url_parse_ex
2014-03-18 08:57:30 +01:00
Mateusz Kocielski 497b918e62 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed off-by-one in php_url_parse_ex

Conflicts:
	ext/standard/url.c
2014-03-18 08:54:57 +01:00
Mateusz Kocielski 46566b78c9 Fixed off-by-one in php_url_parse_ex
Change order of condition, previously pointer could be derefrenced before
bound check was done.
2014-03-18 08:48:41 +01:00
Stanislav Malyshev 66bf216c66 Fix bug #66873: check if obj->src is set 2014-03-17 01:19:02 -07:00
Remi Collet 80fa2ff646 NEWS 2014-03-14 09:52:37 +01:00
Remi Collet e1d8c0a051 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #66833 Default digest algo is still MD5
2014-03-14 09:52:02 +01:00
Remi Collet 87a87c6682 NEWS 2014-03-14 09:51:53 +01:00
Remi Collet 17f6391bf8 Fixed Bug #66833 Default digest algo is still MD5
Switch to SHA1, which match internal openssl hardcoded algo.

In most case, won't even be noticed
- priority on user input (default_md)
- fallback on system config
- fallback on this default value

Recent system reject MD5 digest, noticed in bug36732.phpt failure.

While SHA1 is better than MD5, SHA256 is recommenced,
and defined as default algo in provided configuration on
recent system (Fedora 21, RHEL-7, ...). But the idea is to
keep in sync with openssl internal value for PHP internal value.
2014-03-14 09:50:15 +01:00
David Zülke db6c33875c Fix 5.5.10 NEWS
The FPM change didn't make it into 5.5.10 but will instead be in 5.5.11; http://php.net/Changelog-5.php, the release and the NEWS file in the release accurately reflect this, but the 5.5 branch NEWS doesn't (as the release was made and tagged from the last RC, which didn't contain that change yet).
2014-03-13 16:51:44 +01:00
Lior Kaplan 356c442558 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Typo fix: sicret -> secret
2014-03-13 12:40:14 +02:00
Michael Meyer 737c187013 Typo fix: sicret -> secret 2014-03-13 12:37:25 +02:00
Anatol Belski f7b9c12ed9 updated libs_version.txt 2014-03-13 10:28:04 +01:00
Anatol Belski 3f049bcff2 made libgd recognize the 9 version series 2014-03-12 19:30:27 +01:00
Remi Collet 495d5335f9 NEWS 2014-03-12 17:13:24 +01:00
Remi Collet 862c006da1 Fix bug #66887 imagescale - poor quality of scaled image
Issue with signed char overflow.

Upstream fix:
https://bitbucket.org/libgd/gd-libgd/commits/4b86e06937bc5ff116be969137f8da9d1a7869d5
2014-03-12 17:10:51 +01:00
Remi Collet f2d5b2b6c6 Fixed Bug #66893i imagescale ignore method argument
We also have our goto fail; bug.

Upstream fix for libgd
https://bitbucket.org/libgd/gd-libgd/commits/5b42b1178c37ffd30c9a15733058656be0277da0
2014-03-12 15:35:42 +01:00
Nikita Popov 06bbb657ad Fix hash_pbkdf2() with missing $length argument
Also change the type of some string length variables to ensure
that the zpp call works correctly on platforms where sizeof(int)
!= sizeof(long).
2014-03-12 14:16:18 +01:00
Remi Collet 68f318a422 typo in NEWS 2014-03-12 14:08:02 +01:00
Remi Collet 119821a452 NEWS 2014-03-12 13:46:29 +01:00
Remi Collet dada2f550f Fixed Bug #66890 imagescale segfault
zend_parse_parameters "l" expect long, not int
2014-03-12 13:44:58 +01:00
Adam Harvey f8252aa537 Fix compile error with theoretically supported versions of libcurl < 7.12.3. 2014-03-11 11:04:26 -07:00
Tjerk Meesters cb5178a450 Merge branch 'PHP-5.4' into PHP-5.5 2014-03-11 19:14:43 +08:00
Tjerk Meesters ddd7ed9b24 Removed bogus loops 2014-03-11 19:08:18 +08:00
Anatol Belski 72050af855 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  restored the old code in 5.4/5 related to bug #66872
2014-03-11 11:51:35 +01:00
Anatol Belski 1a624e27a6 restored the old code in 5.4/5 related to bug #66872
The crash is reproducable in 5.6+ only, so 5.4 and 5.5 are fine
with the old code.
2014-03-11 11:50:14 +01:00
Christopher Jones 3a8282ed0f Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Pierre Joye (7) and Anatol Belski (1)
# Via Pierre Joye (7) and Anatol Belski (1)
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  updated libsqlite to 3.8.3.1 in 5.5 branch, too
  update NEWS
  fix #66872, invalid argument crashes gmp_testbit
  fix #66872, invalid argument crashes gmp_testbit
  update news
  - fix #66869, Invalid 2nd argument crashes imageaffinematrixget
  add vc12 (2013)
  add vc12 (2013)
2014-03-10 16:46:40 -07:00
Christopher Jones 4dc8610d34 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Pierre Joye
# Via Pierre Joye
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  fix #66872, invalid argument crashes gmp_testbit
  fix #66872, invalid argument crashes gmp_testbit
  add vc12 (2013)
2014-03-10 16:46:39 -07:00
Anatol Belski 73b3f58bcd updated libsqlite to 3.8.3.1 in 5.5 branch, too 2014-03-10 17:49:35 +01:00
Pierre Joye 8391277fb8 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
# By Anatol Belski
# Via Anatol Belski
* 'PHP-5.4' of git.php.net:php-src:
  updated libmagic.patch
2014-03-10 16:31:09 +01:00
Pierre Joye a92240e209 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
# By Anatol Belski (1) and others
# Via Anatol Belski
* 'PHP-5.5' of git.php.net:php-src:
  updated libmagic.patch
  Fix indentation
  Do not remove *.1, it's not generated by make but configure
2014-03-10 16:30:05 +01:00
Anatol Belski c17fd65165 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated libmagic.patch
2014-03-10 14:13:15 +01:00
Anatol Belski b9d494a33b updated libmagic.patch 2014-03-10 14:12:20 +01:00
Pierre Joye cf7e73cf26 update NEWS 2014-03-10 12:12:46 +01:00
Pierre Joye d2e42d5372 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix #66872, invalid argument crashes gmp_testbit
  fix #66872, invalid argument crashes gmp_testbit
  add vc12 (2013)

Conflicts:
	win32/build/confutils.js
2014-03-10 12:10:57 +01:00
Pierre Joye 28fa31d6e5 fix #66872, invalid argument crashes gmp_testbit 2014-03-10 12:07:58 +01:00
Pierre Joye af41914e15 fix #66872, invalid argument crashes gmp_testbit 2014-03-10 12:06:40 +01:00
Pierre Joye cedc718f73 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
# By Dmitry Panin (1) and Remi Collet (1)
# Via Nikita Popov
* 'PHP-5.4' of git.php.net:php-src:
  Fix HTML entity table generation
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-10 12:04:04 +01:00
Andrey Hristov 3a76cb2d95 Fix indentation 2014-03-10 12:52:56 +02:00
Xinchen Hui a930e04792 Do not remove *.1, it's not generated by make but configure 2014-03-10 15:54:20 +08:00
Pierre Joye 1fdca8208f update news 2014-03-09 21:13:15 +01:00
Pierre Joye 8e3c2015dc - fix #66869, Invalid 2nd argument crashes imageaffinematrixget 2014-03-09 21:12:19 +01:00
Pierre Joye 0c74d5ef08 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
# By Remi Collet (6) and others
# Via Nikita Popov (1) and others
* 'PHP-5.5' of git.php.net:php-src:
  Fixed null termination
  Updated NEWS for #65545
  Add fread(length) method
  Fix HTML entity table generation
  Fix order in NEWS
  Add CVE ref (not known at release time)
  Fix NEWS for 5.5.11 fix (really not in 5.5.10)
  5.5.10 release date for NEWS
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
  NEWS
  Fixed Bug #66815 imagecrop(): insufficient fix for NULL defer CVE-2013-7327
2014-03-09 21:11:19 +01:00
Tjerk Meesters 972935cd95 Fixed null termination 2014-03-07 19:23:46 +08:00
Tjerk Meesters 091b7f841b Updated NEWS for #65545 2014-03-07 18:51:16 +08:00
datibbaw 3c673fed34 Add fread(length) method
Fixed off-by-one write bug

Added test
2014-03-07 18:50:33 +08:00
Nikita Popov ecf7570072 Merge branch 'PHP-5.4' into PHP-5.5 2014-03-06 23:12:41 +01:00
Dmitry Panin e2fc6b52f0 Fix HTML entity table generation 2014-03-06 23:10:31 +01:00
Remi Collet 70dd3f1731 Fix order in NEWS 2014-03-06 10:55:10 +01:00
Remi Collet 9acdf71194 Add CVE ref (not known at release time) 2014-03-06 10:54:18 +01:00
Remi Collet cab1894b81 Fix NEWS for 5.5.11 fix (really not in 5.5.10) 2014-03-06 10:53:07 +01:00
Julien Pauli b31a9cd4da 5.5.10 release date for NEWS 2014-03-06 10:18:10 +01:00
Remi Collet 7d5c11c235 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-06 10:16:16 +01:00
Remi Collet 721b9a7c8d Set default Digest Message to use SHA1 instead of MD5 in openssl tests
as MD5 signature are now rejected by newer openssl Version.

Noticed in RHEL-7 and Fedora 21 build.
2014-03-06 10:14:08 +01:00
Remi Collet 515c103a08 NEWS 2014-03-05 10:43:45 +01:00
Remi Collet af09d8b96a Fixed Bug #66815 imagecrop(): insufficient fix for NULL defer CVE-2013-7327
This amends commit 8f4a537, which aimed to correct NULL dereference because of
missing check of gdImageCreateTrueColor() / gdImageCreate() return value.  That
commit checks for negative crop rectangle width and height, but
gdImageCreate*() can also return NULL when width * height overflows.  Hence
NULL deref is still possible, as gdImageSaveAlpha() and gdImagePaletteCopy()
is called before dst == NULL check.

This moves NULL check to happen right after gdImageCreate*().  It also removes
width and height check before gdImageCreate*(), as the same check is done by
image create functions (with an extra warning).

From thoger redhat com
2014-03-05 10:40:36 +01:00
Pierre Joye b084157d3d Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
# By Anatol Belski (38) and others
# Via Anatol Belski (23) and others
* 'PHP-5.5' of git.php.net:php-src: (325 commits)
  NEWS
  NEWS
  Fixed Bug #66820 out-of-bounds memory access in fileinfo
  Improves fix for memory leak, keep in sync with upstream.
  Fixed news for #60602
  Updated news for #60602
  proc_open(): separate environment values that aren't strings
  Fixed NEWS.
  Updated news for #66535 and #66109
  Updated NEWS for #66535
  don't compare constants on run time
  substr_compare(): Allow zero length comparison
  Fixed test case title
  [bug 66535] X-PHP-Originating-Script adds newline if no custom headers are given
  Fixed expected output of a few cURL test cases
  Allow NULL as value for CURLOPT_CUSTOMREQUEST option.
  man page: long option name is --strip, not --stripped
  --global have be removed in 5.2
  typo spotted by Lajos Veres
  update libs_version.txt
  ...
2014-03-05 10:37:04 +01:00
Pierre Joye e590aceb5a Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
# By Anatol Belski (22) and others
# Via Derick Rethans (5) and others
* 'PHP-5.4' of git.php.net:php-src: (176 commits)
  NEWS
  Fixed Bug #66820 out-of-bounds memory access in fileinfo
  Improves fix for memory leak, keep in sync with upstream.
  Updated news for #60602
  proc_open(): separate environment values that aren't strings
  Updated NEWS for #66535
  Fixed test case title
  [bug 66535] X-PHP-Originating-Script adds newline if no custom headers are given
  man page: long option name is --strip, not --stripped
  --global have be removed in 5.2
  NEWS
  test for bug #66762
  Fixed Bug #66762 Segfault in mysqli_stmt::bind_result() when link closed
  fix tests broken by 633f898f15
  add news entry
  add clear_env option to FPM config
  Reduce test noise on cross Oracle client <-> server version tests. This fix is already in PHP 5.6+
  Reduce test noise in cross Oracle client <-> server version testing. This change is already in PHP 5.6+
  fixed macro
  Make sure value is initialized
  ...
2014-03-05 10:32:42 +01:00
Remi Collet 014b95a0a7 NEWS 2014-03-04 20:36:31 +01:00
Remi Collet 5d08cae346 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #66820 out-of-bounds memory access in fileinfo
2014-03-04 20:36:08 +01:00
Remi Collet c2a9f73c99 NEWS 2014-03-04 20:35:56 +01:00
Remi Collet a33759fd27 Fixed Bug #66820 out-of-bounds memory access in fileinfo
Upstream fix:
https://github.com/glensc/file/commit/447558595a3650db2886cd2f416ad0beba965801

Notice, test changed, with upstream agreement:
-define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >= ((n) - (o)))
+define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >  ((n) - (o)))
2014-03-04 20:32:52 +01:00
Remi Collet bc0b6e02e4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Improves fix for memory leak, keep in sync with upstream.
2014-03-04 13:43:42 +01:00
Remi Collet 731013ee8e Improves fix for memory leak, keep in sync with upstream.
Previous fix:
http://git.php.net/?p=php-src.git;a=commitdiff;h=10eb0070700382f966bf260e44135e1f724a15d2

Upstream fix:
https://github.com/glensc/file/commit/c0c0032b9e9eb57b91fefef905a3b018bab492d9
2014-03-04 13:41:37 +01:00
Tjerk Meesters c34f26a938 Fixed news for #60602 2014-03-03 05:57:36 +08:00
Tjerk Meesters bbd0781b39 Merge branch 'PHP-5.4' into PHP-5.5 2014-03-03 05:56:22 +08:00
Tjerk Meesters 1533f98afd Updated news for #60602 2014-03-03 05:54:09 +08:00
Tjerk Meesters e73c05b75e proc_open(): separate environment values that aren't strings
Added a test case
2014-03-03 05:49:52 +08:00
Derick Rethans 3eb8102348 Fixed NEWS. 2014-03-02 13:27:35 -05:00
Tjerk Meesters c9680697ec Updated news for #66535 and #66109 2014-03-01 12:27:22 +08:00
Tjerk Meesters 362b70a32c Updated NEWS for #66535 2014-03-01 08:47:32 +08:00
Anatol Belski 36c445970e don't compare constants on run time 2014-02-28 19:38:32 +01:00
datibbaw 2e459be237 substr_compare(): Allow zero length comparison
Treat zero length comparison as always equal.
2014-02-28 23:45:04 +08:00
Tjerk Meesters d022c8565d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed test case title
  [bug 66535] X-PHP-Originating-Script adds newline if no custom headers are given
2014-02-28 22:30:21 +08:00
Tjerk Meesters eca13f7909 Fixed test case title 2014-02-28 22:27:32 +08:00
Tjerk Meesters 79b3c2a744 [bug 66535] X-PHP-Originating-Script adds newline if no custom headers are given
A newline is added to the mail headers when mail.add_x_header is used and no other headers are passed to mail().

The scenario in which custom headers are used was already fixed in #48620, back in 2009.
2014-02-28 22:22:07 +08:00
Tjerk Meesters 9443fb999d Fixed expected output of a few cURL test cases 2014-02-28 18:59:06 +08:00
datibbaw 488e64dbe4 Allow NULL as value for CURLOPT_CUSTOMREQUEST option.
Added test case.

Refactored the code to isolate the string handling. Fixed return values to use SUCCESS and FAILURE.

Removed unused error variable.

Indentation fix.
Removed the ugly goto.
2014-02-28 18:27:22 +08:00
Remi Collet 5fc7382a57 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  man page: long option name is --strip, not --stripped
  --global have be removed in 5.2
2014-02-28 08:12:16 +01:00
Remi Collet b1df743b7a man page: long option name is --strip, not --stripped 2014-02-28 08:12:03 +01:00
Remi Collet c73b0543f1 --global have be removed in 5.2 2014-02-28 08:10:01 +01:00
Ferenc Kovacs 561843c973 typo spotted by Lajos Veres 2014-02-27 11:29:08 +01:00
Anatol Belski ccd4bf5147 update libs_version.txt 2014-02-27 09:23:48 +01:00
Remi Collet cb0e6124d4 NEWS 2014-02-27 08:49:56 +01:00
Remi Collet 82e92c99a6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  test for bug #66762
  Fixed Bug #66762 Segfault in mysqli_stmt::bind_result() when link closed
2014-02-27 08:49:33 +01:00
Remi Collet 33d372a45f NEWS 2014-02-27 08:49:08 +01:00
Remi Collet 816a5d2072 test for bug #66762 2014-02-27 08:48:01 +01:00
Remi Collet 9137acc7ec Fixed Bug #66762 Segfault in mysqli_stmt::bind_result() when link closed
Each new mysqli_stmt now increase the refcount of the link object.
So the link is really destroy after all statements.

Only implemented with libmysqlclient, as mysqlnd already implement
this internally.

So, libmysqlclient and mysqlnd have the same behavior.
2014-02-27 08:45:16 +01:00
Pierre Joye fb3e21fbcc add vc12 (2013) 2013-11-04 22:25:50 +01:00
Pierre Joye 07b9db3def Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
# By Xinchen Hui
# Via Xinchen Hui
* 'PHP-5.5' of git.php.net:php-src:
  Fixed coredump due to abnormal implemention of phar
  remove "PHP 6" staff
2013-11-04 22:21:03 +01:00
Pierre Joye 9b54901ffb add vc12 (2013) 2013-11-04 22:19:02 +01:00
57 changed files with 59167 additions and 40527 deletions

No files matched your search

-1
View File
@@ -115,7 +115,6 @@ clean:
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
find . -name \*.1 | xargs rm -f
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
+67 -17
View File
@@ -1,8 +1,63 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2014, PHP 5.5.11
03 Apr 2014, PHP 5.5.11
?? ??? 2014, PHP 5.5.10
- Core:
. Allow zero length comparison in substr_compare() (Tjerk)
. Fixed bug #60602 (proc_open() changes environment array) (Tjerk)
- SPL:
. Added feature #65545 (SplFileObject::fread()) (Tjerk)
- cURL:
. Fixed bug #66109 (Can't reset CURLOPT_CUSTOMREQUEST to default behaviour) (Tjerk)
. Fix compilation on libcurl versions between 7.10.5 and 7.12.2, inclusive.
(Adam)
- FPM:
. Added clear_env configuration directive to disable clearenv() call.
(Github PR# 598, Paul Annesley)
- Fileinfo:
. Fixed bug #66946 (fileinfo: extensive backtracking in awk rule regular
expression). (CVE-2013-7345) (Remi)
- GD:
. Fixed bug #66714 (imageconvolution breakage). (Brad Daily)
. Fixed bug #66869 (Invalid 2nd argument crashes imageaffinematrixget) (Pierre)
. Fixed bug #66887 (imagescale - poor quality of scaled image). (Remi)
. Fixed bug #66890 (imagescale segfault). (Remi)
. Fixed bug #66893 (imagescale ignore method argument). (Remi)
- Hash:
. hash_pbkdf2() now works correctly if the $length argument is not specified.
(Nikita)
- Intl:
. Fixed bug #66873 (A reproductible crash in UConverter when given invalid
encoding) (Stas)
- Mail:
. Fixed bug #66535 (Don't add newline after X-PHP-Originating-Script) (Tjerk)
- MySQLi:
. Fixed bug #66762 (Segfault in mysqli_stmt::bind_result() when link closed)
(Remi)
- OPCache
. Added function opcache_is_script_cached(). (Danack)
. Added information about interned strings usage. (Terry, Julien, Dmitry)
- Openssl:
. Fixed bug #66833 (Default disgest algo is still MD5, switch to SHA1). (Remi)
- GMP
. Fixed bug #66872 (invalid argument crashes gmp_testbit) (Pierre)
- SQLite:
. Updated bundled libsqlite to 3.8.3.1 (Anatol)
06 Mar 2014, PHP 5.5.10
- Core:
. Fixed Request #66574i (Allow multiple paths in php_ini_scanned_path). (Remi)
@@ -13,13 +68,12 @@ PHP NEWS
- Fileinfo:
. Bug #66731 (file: infinite recursion) (CVE-2014-1943). (Remi)
- FPM:
. Added clear_env configuration directive to disable clearenv() call.
(Github PR# 598, Paul Annesley)
. Fixed bug #66820 (out-of-bounds memory access in fileinfo)
(CVE-2014-2270). (Remi)
- GD
. Fixed bug #66714 ( imageconvolution breakage). (Brad Daily)
. Fixed Bug #66815 (imagecrop(): insufficient fix for NULL defer
CVE-2013-7327). (Tomas Hoger, Remi)
- JSON:
. Fixed bug #65753 (JsonSerializeable couldn't implement on module extension)
@@ -29,10 +83,6 @@ PHP NEWS
. Implemented ldap_modify_batch (https://wiki.php.net/rfc/ldap_modify_batch).
(Ondřej Hošek)
- OPCache
. Added function opcache_is_script_cached(). (Danack)
. Added information about interned strings usage. (Terry, Julien, Dmitry)
- Openssl:
. Fixed bug #66501 (Add EC key support to php_openssl_is_private_key).
(Mark Zedwood)
@@ -655,6 +705,12 @@ spaces) (willfitch, iliaa)
CURLOPT_RTSP_REQUEST, CURLOPT_RESOLVE, CURLOPT_ACCEPT_ENCODING,
CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL.
(Pierrick)
. Added new functions curl_escape, curl_multi_setopt, curl_multi_strerror
curl_pause, curl_reset, curl_share_close, curl_share_init,
curl_share_setopt curl_strerror and curl_unescape. (Pierrick)
. Addes new curl options CURLOPT_TELNETOPTIONS, CURLOPT_GSSAPI_DELEGATION,
CURLOPT_ACCEPTTIMEOUT_MS, CURLOPT_SSL_OPTIONS, CURLOPT_TCP_KEEPALIVE,
CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL. (Pierrick)
. Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant
still exists for backward compatibility but is doing nothing). (Pierrick)
. Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick)
@@ -662,12 +718,6 @@ spaces) (willfitch, iliaa)
- DateTime
. Added DateTimeImmutable - a variant of DateTime that only returns the
modified state instead of changing itself. (Derick)
. Added new functions curl_escape, curl_multi_setopt, curl_multi_strerror
curl_pause, curl_reset, curl_share_close, curl_share_init,
curl_share_setopt curl_strerror and curl_unescape. (Pierrick)
. Addes new curl options CURLOPT_TELNETOPTIONS, CURLOPT_GSSAPI_DELEGATION,
CURLOPT_ACCEPTTIMEOUT_MS, CURLOPT_SSL_OPTIONS, CURLOPT_TCP_KEEPALIVE,
CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL. (Pierrick)
. Fixed bug #64825 (Invalid free when unserializing DateTimeZone).
(Anatol)
. Fixed bug #64359 (strftime crash with VS2012). (Anatol)
+1 -1
View File
@@ -1237,7 +1237,7 @@ function gen_vm($def, $skel) {
out($f, "# pragma warning(once : 6285)\n");
// Suppress (<non-zero constant> || <expression>) warnings on windows
out($f, "# pragma warning(once : 6286)\n");
// Suppress constant with constant comparsion warnings on windows
// Suppress constant with constant comparison warnings on windows
out($f, "# pragma warning(once : 6326)\n");
}
out($f, "#endif\n");
+1 -1
View File
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=5
PHP_RELEASE_VERSION=11
PHP_EXTRA_VERSION="-dev"
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+83 -98
View File
@@ -165,50 +165,62 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
# define php_curl_ret(__ret) RETVAL_FALSE; return;
#endif
static int php_curl_option_url(php_curl *ch, const char *url, const int len TSRMLS_DC) /* {{{ */
static int php_curl_option_str(php_curl *ch, long option, const char *str, const int len, zend_bool make_copy TSRMLS_DC)
{
CURLcode error = CURLE_OK;
#if LIBCURL_VERSION_NUM < 0x071100
char *copystr = NULL;
#if LIBCURL_VERSION_NUM >= 0x071100
if (make_copy) {
#endif
char *copystr;
/* Strings passed to libcurl as 'char *' arguments, are copied by the library since 7.17.0 */
copystr = estrndup(str, len);
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free->str, &copystr);
#if LIBCURL_VERSION_NUM >= 0x071100
} else {
error = curl_easy_setopt(ch->cp, option, str);
}
#endif
SAVE_CURL_ERROR(ch, error)
return error == CURLE_OK ? SUCCESS : FAILURE;
}
static int php_curl_option_url(php_curl *ch, const char *url, const int len TSRMLS_DC) /* {{{ */
{
/* Disable file:// if open_basedir are used */
if (PG(open_basedir) && *PG(open_basedir)) {
#if LIBCURL_VERSION_NUM >= 0x071304
error = curl_easy_setopt(ch->cp, CURLOPT_PROTOCOLS, CURLPROTO_ALL & ~CURLPROTO_FILE);
curl_easy_setopt(ch->cp, CURLOPT_PROTOCOLS, CURLPROTO_ALL & ~CURLPROTO_FILE);
#else
php_url *uri;
if (!(uri = php_url_parse_ex(url, len))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid URL '%s'", url);
return 0;
return FAILURE;
}
if (uri->scheme && !strncasecmp("file", uri->scheme, sizeof("file"))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol 'file' disabled in cURL");
php_url_free(uri);
return 0;
return FAILURE;
}
php_url_free(uri);
#endif
}
/* Strings passed to libcurl as 'char *' arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
#if LIBCURL_VERSION_NUM >= 0x071100
error = curl_easy_setopt(ch->cp, CURLOPT_URL, url);
#else
copystr = estrndup(url, len);
error = curl_easy_setopt(ch->cp, CURLOPT_URL, copystr);
zend_llist_add_element(&ch->to_free->str, &copystr);
#endif
return (error == CURLE_OK ? 1 : 0);
return php_curl_option_str(ch, CURLOPT_URL, url, len, 0 TSRMLS_CC);
}
/* }}} */
int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC) /* {{{ */
void _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC) /* {{{ */
{
php_stream *stream;
if (!ch || !ch->handlers) {
return 0;
return;
}
if (ch->handlers->std_err) {
@@ -265,7 +277,7 @@ int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC) /* {{{ */
curl_easy_setopt(ch->cp, CURLOPT_FILE, (void *) ch);
}
}
return 1;
return ;
}
/* }}} */
@@ -1941,7 +1953,7 @@ PHP_FUNCTION(curl_init)
_php_curl_set_default_options(ch);
if (url) {
if (!php_curl_option_url(ch, url, url_len TSRMLS_CC)) {
if (php_curl_option_url(ch, url, url_len TSRMLS_CC) == FAILURE) {
_php_curl_close_ex(ch TSRMLS_CC);
RETURN_FALSE;
}
@@ -2058,7 +2070,7 @@ PHP_FUNCTION(curl_copy_handle)
}
/* }}} */
static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *return_value TSRMLS_DC) /* {{{ */
static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue TSRMLS_DC) /* {{{ */
{
CURLcode error=CURLE_OK;
@@ -2225,7 +2237,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
(PG(open_basedir) && *PG(open_basedir)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLPROTO_FILE cannot be activated when an open_basedir is set");
RETVAL_FALSE;
return 1;
}
#endif
@@ -2240,14 +2251,10 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
case CURLOPT_CAINFO:
case CURLOPT_CAPATH:
case CURLOPT_COOKIE:
case CURLOPT_CUSTOMREQUEST:
case CURLOPT_EGDSOCKET:
case CURLOPT_FTPPORT:
case CURLOPT_INTERFACE:
case CURLOPT_PRIVATE:
case CURLOPT_PROXY:
case CURLOPT_PROXYUSERPWD:
case CURLOPT_RANGE:
case CURLOPT_REFERER:
case CURLOPT_SSLCERTTYPE:
case CURLOPT_SSLENGINE:
@@ -2256,23 +2263,14 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
case CURLOPT_SSLKEYPASSWD:
case CURLOPT_SSLKEYTYPE:
case CURLOPT_SSL_CIPHER_LIST:
case CURLOPT_URL:
case CURLOPT_USERAGENT:
case CURLOPT_USERPWD:
#if LIBCURL_VERSION_NUM >= 0x070d00 /* Available since 7.13.0 */
case CURLOPT_FTP_ACCOUNT:
#endif
#if LIBCURL_VERSION_NUM >= 0x070e01 /* Available since 7.14.1 */
case CURLOPT_COOKIELIST:
#endif
#if LIBCURL_VERSION_NUM >= 0x070f05 /* Available since 7.15.5 */
case CURLOPT_FTP_ALTERNATIVE_TO_USER:
#endif
#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */
case CURLOPT_KRBLEVEL:
#else
case CURLOPT_KRB4LEVEL:
#endif
#if LIBCURL_VERSION_NUM >= 0x071101 /* Available since 7.17.1 */
case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
#endif
@@ -2287,7 +2285,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
#endif
#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
case CURLOPT_MAIL_FROM:
case CURLOPT_RTSP_SESSION_ID:
case CURLOPT_RTSP_STREAM_URI:
case CURLOPT_RTSP_TRANSPORT:
#endif
@@ -2309,32 +2306,44 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
#endif
{
convert_to_string_ex(zvalue);
if (option == CURLOPT_URL) {
if (!php_curl_option_url(ch, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue) TSRMLS_CC)) {
RETVAL_FALSE;
return 1;
}
} else {
if (option == CURLOPT_PRIVATE) {
char *copystr;
#if LIBCURL_VERSION_NUM < 0x071100
string_copy:
return php_curl_option_str(ch, option, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue), 0 TSRMLS_CC);
}
/* Curl nullable string options */
case CURLOPT_CUSTOMREQUEST:
case CURLOPT_FTPPORT:
case CURLOPT_RANGE:
#if LIBCURL_VERSION_NUM >= 0x070d00 /* Available since 7.13.0 */
case CURLOPT_FTP_ACCOUNT:
#endif
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free->str, &copystr);
} else {
#if LIBCURL_VERSION_NUM >= 0x071100
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
case CURLOPT_RTSP_SESSION_ID:
#endif
#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */
case CURLOPT_KRBLEVEL:
#else
goto string_copy;
case CURLOPT_KRB4LEVEL:
#endif
}
{
if (Z_TYPE_PP(zvalue) == IS_NULL) {
error = curl_easy_setopt(ch->cp, option, NULL);
} else {
convert_to_string_ex(zvalue);
return php_curl_option_str(ch, option, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue), 0 TSRMLS_CC);
}
break;
}
/* Curl private option */
case CURLOPT_PRIVATE:
convert_to_string_ex(zvalue);
return php_curl_option_str(ch, option, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue), 1 TSRMLS_CC);
/* Curl url option */
case CURLOPT_URL:
convert_to_string_ex(zvalue);
return php_curl_option_url(ch, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue) TSRMLS_CC);
/* Curl file handle options */
case CURLOPT_FILE:
case CURLOPT_INFILE:
@@ -2346,18 +2355,15 @@ string_copy:
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream(), php_file_le_pstream());
if (!what) {
RETVAL_FALSE;
return 1;
return FAILURE;
}
if (FAILURE == php_stream_cast((php_stream *) what, PHP_STREAM_AS_STDIO, (void *) &fp, REPORT_ERRORS)) {
RETVAL_FALSE;
return 1;
return FAILURE;
}
if (!fp) {
RETVAL_FALSE;
return 1;
return FAILURE;
}
error = CURLE_OK;
@@ -2373,8 +2379,7 @@ string_copy:
ch->handlers->write->stream = *zvalue;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
RETVAL_FALSE;
return 1;
return FAILURE;
}
break;
case CURLOPT_WRITEHEADER:
@@ -2388,8 +2393,7 @@ string_copy:
ch->handlers->write_header->stream = *zvalue;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
RETVAL_FALSE;
return 1;
return FAILURE;
}
break;
case CURLOPT_INFILE:
@@ -2410,8 +2414,7 @@ string_copy:
ch->handlers->std_err = *zvalue;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
RETVAL_FALSE;
return 1;
return FAILURE;
}
/* break omitted intentionally */
default:
@@ -2473,8 +2476,7 @@ string_copy:
#endif
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must pass either an object or an array with the %s argument", name);
RETVAL_FALSE;
return 1;
return FAILURE;
}
for (zend_hash_internal_pointer_reset(ph);
@@ -2487,7 +2489,6 @@ string_copy:
slist = curl_slist_append(slist, Z_STRVAL_PP(current));
if (!slist) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not build curl_slist");
RETVAL_FALSE;
return 1;
}
}
@@ -2507,8 +2508,7 @@ string_copy:
if (PG(open_basedir) && *PG(open_basedir)) {
if (Z_LVAL_PP(zvalue) != 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set");
RETVAL_FALSE;
return 1;
return FAILURE;
}
}
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
@@ -2534,8 +2534,7 @@ string_copy:
postfields = HASH_OF(*zvalue);
if (!postfields) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
RETVAL_FALSE;
return 1;
return FAILURE;
}
for (zend_hash_internal_pointer_reset(postfields);
@@ -2571,7 +2570,6 @@ string_copy:
postval = Z_STRVAL_P(prop);
if (php_check_open_basedir(postval TSRMLS_CC)) {
RETVAL_FALSE;
return 1;
}
@@ -2620,8 +2618,7 @@ string_copy:
}
/* open_basedir check */
if (php_check_open_basedir(postval TSRMLS_CC)) {
RETVAL_FALSE;
return 1;
return FAILURE;
}
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
@@ -2652,8 +2649,7 @@ string_copy:
SAVE_CURL_ERROR(ch, error);
if (error != CURLE_OK) {
RETVAL_FALSE;
return 1;
return FAILURE;
}
if (Z_REFCOUNT_P(ch->clone) <= 1) {
@@ -2675,7 +2671,7 @@ string_copy:
post = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
zend_llist_add_element(&ch->to_free->str, &post);
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDS, post);
curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDS, post);
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, Z_STRLEN_PP(zvalue));
#endif
}
@@ -2773,26 +2769,13 @@ string_copy:
case CURLOPT_SSH_KNOWNHOSTS:
#endif
{
#if LIBCURL_VERSION_NUM < 0x071100
char *copystr = NULL;
#endif
convert_to_string_ex(zvalue);
if (Z_STRLEN_PP(zvalue) && php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
RETVAL_FALSE;
return 1;
return FAILURE;
}
#if LIBCURL_VERSION_NUM >= 0x071100
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
#else
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free->str, &copystr);
#endif
break;
return php_curl_option_str(ch, option, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue), 0 TSRMLS_CC);
}
case CURLINFO_HEADER_OUT:
@@ -2837,9 +2820,9 @@ string_copy:
SAVE_CURL_ERROR(ch, error);
if (error != CURLE_OK) {
return 1;
return FAILURE;
} else {
return 0;
return SUCCESS;
}
}
/* }}} */
@@ -2863,7 +2846,7 @@ PHP_FUNCTION(curl_setopt)
RETURN_FALSE;
}
if (!_php_curl_setopt(ch, options, zvalue, return_value TSRMLS_CC)) {
if (_php_curl_setopt(ch, options, zvalue TSRMLS_CC) == SUCCESS) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -2894,7 +2877,7 @@ PHP_FUNCTION(curl_setopt_array)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array keys must be CURLOPT constants or equivalent integer values");
RETURN_FALSE;
}
if (_php_curl_setopt(ch, (long) option, entry, return_value TSRMLS_CC)) {
if (_php_curl_setopt(ch, (long) option, entry TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
zend_hash_move_forward_ex(Z_ARRVAL_P(arr), &pos);
@@ -3159,6 +3142,7 @@ PHP_FUNCTION(curl_getinfo)
}
break;
}
#if LIBCURL_VERSION_NUM >= 0x070c03 /* Available since 7.12.3 */
case CURLINFO_SLIST:
{
struct curl_slist *slist;
@@ -3174,6 +3158,7 @@ PHP_FUNCTION(curl_getinfo)
}
break;
}
#endif
default:
RETURN_FALSE;
}
+1 -1
View File
@@ -198,7 +198,7 @@ typedef struct {
void _php_curl_cleanup_handle(php_curl *);
void _php_curl_multi_cleanup_list(void *data);
int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC);
void _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC);
void curlfile_register_class(TSRMLS_D);
PHP_CURL_API extern zend_class_entry *curl_CURLFile_class;
+1 -2
View File
@@ -81,8 +81,7 @@ Ok for CURLOPT_WRITEHEADER
Warning: curl_multi_exec(): CURLOPT_FILE resource has gone away, resetting to default in %sbug48203_multi.php on line 36
Warning: curl_multi_exec(): CURLOPT_FILE resource has gone away, resetting to default in %sbug48203_multi.php on line 36
%A
Ok for CURLOPT_FILE
%AOk for CURLOPT_FILE
Warning: curl_multi_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug48203_multi.php on line 36
+2 -3
View File
@@ -58,15 +58,14 @@ foreach($options_to_check as $option) {
--EXPECTF--
Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug54798.php on line %d
* About to connect() %a
* Closing connection #%d
* Closing connection %d
Ok for CURLOPT_STDERR
Warning: curl_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug54798.php on line 24
Ok for CURLOPT_WRITEHEADER
Warning: curl_exec(): CURLOPT_FILE resource has gone away, resetting to default in %sbug54798.php on line 24
%a
Ok for CURLOPT_FILE
%aOk for CURLOPT_FILE
Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug54798.php on line %d
Ok for CURLOPT_INFILE
+31
View File
@@ -0,0 +1,31 @@
--TEST--
Bug #66109 (Option CURLOPT_CUSTOMREQUEST can't be reset to default.)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=method");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
var_dump(curl_exec($ch));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, NULL);
var_dump(curl_exec($ch));
curl_close($ch);
?>
--EXPECTF--
string(6) "DELETE"
string(3) "GET"
@@ -33,6 +33,5 @@ echo "Closed correctly\n";
<?php
unlink(dirname(__FILE__) . '/curl_file_deleted_before_curl_close.tmp');
?>
--EXPECTF--
* Closing connection #%d
--EXPECT--
Closed correctly
-1
View File
@@ -48,5 +48,4 @@ curl_close($ch);
*** Testing curl_setopt with CURLOPT_STDERR
string(%d) "%S"
string(%d) "%S"
* Closing connection #%d
+3
View File
@@ -31,6 +31,9 @@
echo $_FILES['file']['name'] . '|' . $_FILES['file']['type'];
}
break;
case 'method':
echo $_SERVER['REQUEST_METHOD'];
break;
default:
echo "Hello World!\n";
echo "Hello World!";
+207 -207
View File
@@ -435,152 +435,152 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[579] = {
{ "Europe/Jersey" , 0x02EA09 },
{ "Europe/Kaliningrad" , 0x02EF40 },
{ "Europe/Kiev" , 0x02F1A6 },
{ "Europe/Lisbon" , 0x02F4BD },
{ "Europe/Ljubljana" , 0x02F9C1 },
{ "Europe/London" , 0x02FC8A },
{ "Europe/Luxembourg" , 0x0301C1 },
{ "Europe/Madrid" , 0x030617 },
{ "Europe/Malta" , 0x0309DD },
{ "Europe/Mariehamn" , 0x030D96 },
{ "Europe/Minsk" , 0x03104C },
{ "Europe/Monaco" , 0x03125A },
{ "Europe/Moscow" , 0x031695 },
{ "Europe/Nicosia" , 0x0318E6 },
{ "Europe/Oslo" , 0x031BCE },
{ "Europe/Paris" , 0x031F00 },
{ "Europe/Podgorica" , 0x032346 },
{ "Europe/Prague" , 0x03260F },
{ "Europe/Riga" , 0x032941 },
{ "Europe/Rome" , 0x032C86 },
{ "Europe/Samara" , 0x033049 },
{ "Europe/San_Marino" , 0x03327C },
{ "Europe/Sarajevo" , 0x03363F },
{ "Europe/Simferopol" , 0x033908 },
{ "Europe/Skopje" , 0x033C33 },
{ "Europe/Sofia" , 0x033EFC },
{ "Europe/Stockholm" , 0x034204 },
{ "Europe/Tallinn" , 0x0344B3 },
{ "Europe/Tirane" , 0x0347ED },
{ "Europe/Tiraspol" , 0x034AF3 },
{ "Europe/Uzhgorod" , 0x034E81 },
{ "Europe/Vaduz" , 0x035198 },
{ "Europe/Vatican" , 0x035447 },
{ "Europe/Vienna" , 0x03580A },
{ "Europe/Vilnius" , 0x035B37 },
{ "Europe/Volgograd" , 0x035E76 },
{ "Europe/Warsaw" , 0x036076 },
{ "Europe/Zagreb" , 0x036457 },
{ "Europe/Zaporozhye" , 0x036720 },
{ "Europe/Zurich" , 0x036A61 },
{ "Factory" , 0x036D10 },
{ "GB" , 0x036D81 },
{ "GB-Eire" , 0x0372B8 },
{ "GMT" , 0x0377EF },
{ "GMT+0" , 0x0378BB },
{ "GMT-0" , 0x037877 },
{ "GMT0" , 0x037833 },
{ "Greenwich" , 0x0378FF },
{ "Hongkong" , 0x037943 },
{ "HST" , 0x037B05 },
{ "Iceland" , 0x037B49 },
{ "Indian/Antananarivo" , 0x037D02 },
{ "Indian/Chagos" , 0x037D76 },
{ "Indian/Christmas" , 0x037DD8 },
{ "Indian/Cocos" , 0x037E1C },
{ "Indian/Comoro" , 0x037E60 },
{ "Indian/Kerguelen" , 0x037EB5 },
{ "Indian/Mahe" , 0x037F0A },
{ "Indian/Maldives" , 0x037F5F },
{ "Indian/Mauritius" , 0x037FB4 },
{ "Indian/Mayotte" , 0x03802A },
{ "Indian/Reunion" , 0x03807F },
{ "Iran" , 0x0380D4 },
{ "Israel" , 0x038342 },
{ "Jamaica" , 0x038671 },
{ "Japan" , 0x038736 },
{ "Kwajalein" , 0x0387BF },
{ "Libya" , 0x038822 },
{ "MET" , 0x03892B },
{ "Mexico/BajaNorte" , 0x038C34 },
{ "Mexico/BajaSur" , 0x038F9D },
{ "Mexico/General" , 0x0391E2 },
{ "MST" , 0x039440 },
{ "MST7MDT" , 0x039484 },
{ "Navajo" , 0x0397D5 },
{ "NZ" , 0x039B4E },
{ "NZ-CHAT" , 0x039ECC },
{ "Pacific/Apia" , 0x03A1B4 },
{ "Pacific/Auckland" , 0x03A350 },
{ "Pacific/Chatham" , 0x03A6DC },
{ "Pacific/Chuuk" , 0x03A9D3 },
{ "Pacific/Easter" , 0x03AA2C },
{ "Pacific/Efate" , 0x03AD8A },
{ "Pacific/Enderbury" , 0x03AE50 },
{ "Pacific/Fakaofo" , 0x03AEBE },
{ "Pacific/Fiji" , 0x03AF0F },
{ "Pacific/Funafuti" , 0x03B0A2 },
{ "Pacific/Galapagos" , 0x03B0E6 },
{ "Pacific/Gambier" , 0x03B15E },
{ "Pacific/Guadalcanal" , 0x03B1C3 },
{ "Pacific/Guam" , 0x03B218 },
{ "Pacific/Honolulu" , 0x03B26E },
{ "Pacific/Johnston" , 0x03B2E5 },
{ "Pacific/Kiritimati" , 0x03B364 },
{ "Pacific/Kosrae" , 0x03B3CF },
{ "Pacific/Kwajalein" , 0x03B42C },
{ "Pacific/Majuro" , 0x03B498 },
{ "Pacific/Marquesas" , 0x03B4F7 },
{ "Pacific/Midway" , 0x03B55E },
{ "Pacific/Nauru" , 0x03B5E8 },
{ "Pacific/Niue" , 0x03B660 },
{ "Pacific/Norfolk" , 0x03B6BE },
{ "Pacific/Noumea" , 0x03B713 },
{ "Pacific/Pago_Pago" , 0x03B7A3 },
{ "Pacific/Palau" , 0x03B82C },
{ "Pacific/Pitcairn" , 0x03B870 },
{ "Pacific/Pohnpei" , 0x03B8C5 },
{ "Pacific/Ponape" , 0x03B91A },
{ "Pacific/Port_Moresby" , 0x03B95F },
{ "Pacific/Rarotonga" , 0x03B9A3 },
{ "Pacific/Saipan" , 0x03BA7F },
{ "Pacific/Samoa" , 0x03BAE2 },
{ "Pacific/Tahiti" , 0x03BB6B },
{ "Pacific/Tarawa" , 0x03BBD0 },
{ "Pacific/Tongatapu" , 0x03BC24 },
{ "Pacific/Truk" , 0x03BCB0 },
{ "Pacific/Wake" , 0x03BCF5 },
{ "Pacific/Wallis" , 0x03BD45 },
{ "Pacific/Yap" , 0x03BD89 },
{ "Poland" , 0x03BDCE },
{ "Portugal" , 0x03C1AF },
{ "PRC" , 0x03C6AB },
{ "PST8PDT" , 0x03C75C },
{ "ROC" , 0x03CAAD },
{ "ROK" , 0x03CBC5 },
{ "Singapore" , 0x03CC69 },
{ "Turkey" , 0x03CD20 },
{ "UCT" , 0x03D10D },
{ "Universal" , 0x03D151 },
{ "US/Alaska" , 0x03D195 },
{ "US/Aleutian" , 0x03D4FE },
{ "US/Arizona" , 0x03D864 },
{ "US/Central" , 0x03D8F2 },
{ "US/East-Indiana" , 0x03E2FC },
{ "US/Eastern" , 0x03DDFD },
{ "US/Hawaii" , 0x03E566 },
{ "US/Indiana-Starke" , 0x03E5D7 },
{ "US/Michigan" , 0x03E948 },
{ "US/Mountain" , 0x03EC7F },
{ "US/Pacific" , 0x03EFF8 },
{ "US/Pacific-New" , 0x03F3FD },
{ "US/Samoa" , 0x03F802 },
{ "UTC" , 0x03F88B },
{ "W-SU" , 0x03FB82 },
{ "WET" , 0x03F8CF },
{ "Zulu" , 0x03FDBC },
{ "Europe/Lisbon" , 0x02F4C2 },
{ "Europe/Ljubljana" , 0x02F9C6 },
{ "Europe/London" , 0x02FC8F },
{ "Europe/Luxembourg" , 0x0301C6 },
{ "Europe/Madrid" , 0x03061C },
{ "Europe/Malta" , 0x0309E2 },
{ "Europe/Mariehamn" , 0x030D9B },
{ "Europe/Minsk" , 0x031051 },
{ "Europe/Monaco" , 0x03125F },
{ "Europe/Moscow" , 0x03169A },
{ "Europe/Nicosia" , 0x0318EB },
{ "Europe/Oslo" , 0x031BD3 },
{ "Europe/Paris" , 0x031F05 },
{ "Europe/Podgorica" , 0x03234B },
{ "Europe/Prague" , 0x032614 },
{ "Europe/Riga" , 0x032946 },
{ "Europe/Rome" , 0x032C8B },
{ "Europe/Samara" , 0x03304E },
{ "Europe/San_Marino" , 0x033281 },
{ "Europe/Sarajevo" , 0x033644 },
{ "Europe/Simferopol" , 0x03390D },
{ "Europe/Skopje" , 0x033C38 },
{ "Europe/Sofia" , 0x033F01 },
{ "Europe/Stockholm" , 0x034209 },
{ "Europe/Tallinn" , 0x0344B8 },
{ "Europe/Tirane" , 0x0347F2 },
{ "Europe/Tiraspol" , 0x034AF8 },
{ "Europe/Uzhgorod" , 0x034E86 },
{ "Europe/Vaduz" , 0x03519D },
{ "Europe/Vatican" , 0x03544C },
{ "Europe/Vienna" , 0x03580F },
{ "Europe/Vilnius" , 0x035B3C },
{ "Europe/Volgograd" , 0x035E7B },
{ "Europe/Warsaw" , 0x03607B },
{ "Europe/Zagreb" , 0x03645C },
{ "Europe/Zaporozhye" , 0x036725 },
{ "Europe/Zurich" , 0x036A66 },
{ "Factory" , 0x036D15 },
{ "GB" , 0x036D86 },
{ "GB-Eire" , 0x0372BD },
{ "GMT" , 0x0377F4 },
{ "GMT+0" , 0x0378C0 },
{ "GMT-0" , 0x03787C },
{ "GMT0" , 0x037838 },
{ "Greenwich" , 0x037904 },
{ "Hongkong" , 0x037948 },
{ "HST" , 0x037B0A },
{ "Iceland" , 0x037B4E },
{ "Indian/Antananarivo" , 0x037D07 },
{ "Indian/Chagos" , 0x037D7B },
{ "Indian/Christmas" , 0x037DDD },
{ "Indian/Cocos" , 0x037E21 },
{ "Indian/Comoro" , 0x037E65 },
{ "Indian/Kerguelen" , 0x037EBA },
{ "Indian/Mahe" , 0x037F0F },
{ "Indian/Maldives" , 0x037F64 },
{ "Indian/Mauritius" , 0x037FB9 },
{ "Indian/Mayotte" , 0x03802F },
{ "Indian/Reunion" , 0x038084 },
{ "Iran" , 0x0380D9 },
{ "Israel" , 0x038347 },
{ "Jamaica" , 0x038676 },
{ "Japan" , 0x03873B },
{ "Kwajalein" , 0x0387C4 },
{ "Libya" , 0x038827 },
{ "MET" , 0x038930 },
{ "Mexico/BajaNorte" , 0x038C39 },
{ "Mexico/BajaSur" , 0x038FA2 },
{ "Mexico/General" , 0x0391E7 },
{ "MST" , 0x039445 },
{ "MST7MDT" , 0x039489 },
{ "Navajo" , 0x0397DA },
{ "NZ" , 0x039B53 },
{ "NZ-CHAT" , 0x039ED1 },
{ "Pacific/Apia" , 0x03A1B9 },
{ "Pacific/Auckland" , 0x03A355 },
{ "Pacific/Chatham" , 0x03A6E1 },
{ "Pacific/Chuuk" , 0x03A9D8 },
{ "Pacific/Easter" , 0x03AA31 },
{ "Pacific/Efate" , 0x03AD8F },
{ "Pacific/Enderbury" , 0x03AE55 },
{ "Pacific/Fakaofo" , 0x03AEC3 },
{ "Pacific/Fiji" , 0x03AF14 },
{ "Pacific/Funafuti" , 0x03B0A7 },
{ "Pacific/Galapagos" , 0x03B0EB },
{ "Pacific/Gambier" , 0x03B163 },
{ "Pacific/Guadalcanal" , 0x03B1C8 },
{ "Pacific/Guam" , 0x03B21D },
{ "Pacific/Honolulu" , 0x03B273 },
{ "Pacific/Johnston" , 0x03B2EA },
{ "Pacific/Kiritimati" , 0x03B369 },
{ "Pacific/Kosrae" , 0x03B3D4 },
{ "Pacific/Kwajalein" , 0x03B431 },
{ "Pacific/Majuro" , 0x03B49D },
{ "Pacific/Marquesas" , 0x03B4FC },
{ "Pacific/Midway" , 0x03B563 },
{ "Pacific/Nauru" , 0x03B5ED },
{ "Pacific/Niue" , 0x03B665 },
{ "Pacific/Norfolk" , 0x03B6C3 },
{ "Pacific/Noumea" , 0x03B718 },
{ "Pacific/Pago_Pago" , 0x03B7A8 },
{ "Pacific/Palau" , 0x03B831 },
{ "Pacific/Pitcairn" , 0x03B875 },
{ "Pacific/Pohnpei" , 0x03B8CA },
{ "Pacific/Ponape" , 0x03B91F },
{ "Pacific/Port_Moresby" , 0x03B964 },
{ "Pacific/Rarotonga" , 0x03B9A8 },
{ "Pacific/Saipan" , 0x03BA84 },
{ "Pacific/Samoa" , 0x03BAE7 },
{ "Pacific/Tahiti" , 0x03BB70 },
{ "Pacific/Tarawa" , 0x03BBD5 },
{ "Pacific/Tongatapu" , 0x03BC29 },
{ "Pacific/Truk" , 0x03BCB5 },
{ "Pacific/Wake" , 0x03BCFA },
{ "Pacific/Wallis" , 0x03BD4A },
{ "Pacific/Yap" , 0x03BD8E },
{ "Poland" , 0x03BDD3 },
{ "Portugal" , 0x03C1B4 },
{ "PRC" , 0x03C6B0 },
{ "PST8PDT" , 0x03C761 },
{ "ROC" , 0x03CAB2 },
{ "ROK" , 0x03CBCA },
{ "Singapore" , 0x03CC6E },
{ "Turkey" , 0x03CD25 },
{ "UCT" , 0x03D112 },
{ "Universal" , 0x03D156 },
{ "US/Alaska" , 0x03D19A },
{ "US/Aleutian" , 0x03D503 },
{ "US/Arizona" , 0x03D869 },
{ "US/Central" , 0x03D8F7 },
{ "US/East-Indiana" , 0x03E301 },
{ "US/Eastern" , 0x03DE02 },
{ "US/Hawaii" , 0x03E56B },
{ "US/Indiana-Starke" , 0x03E5DC },
{ "US/Michigan" , 0x03E94D },
{ "US/Mountain" , 0x03EC84 },
{ "US/Pacific" , 0x03EFFD },
{ "US/Pacific-New" , 0x03F402 },
{ "US/Samoa" , 0x03F807 },
{ "UTC" , 0x03F890 },
{ "W-SU" , 0x03FB87 },
{ "WET" , 0x03F8D4 },
{ "Zulu" , 0x03FDC1 },
};
/* This is a generated file, do not modify */
const unsigned char timelib_timezone_db_data_builtin[261632] = {
const unsigned char timelib_timezone_db_data_builtin[261637] = {
/* Africa/Abidjan */
@@ -8126,7 +8126,7 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0xF9, 0xE1, 0xCA, 0x00, 0xFA, 0xF9, 0x39, 0xF0, 0xFB, 0x27, 0x42, 0x50, 0x08, 0x7C, 0x8B, 0xE0,
0x08, 0xFD, 0xB0, 0xD0, 0x09, 0xF6, 0xEA, 0x60, 0x0A, 0xA6, 0x33, 0xD0, 0x1C, 0xBE, 0xF8, 0xE0,
0x1D, 0x89, 0xF1, 0xD0, 0x1E, 0xCC, 0xFF, 0x60, 0x1F, 0x60, 0x99, 0x50, 0x20, 0x82, 0xB1, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5D, 0x4D, 0x60, 0x23, 0x1F, 0x0B, 0xD0, 0x24, 0x5A, 0x30, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5E, 0x9E, 0xE0, 0x23, 0x20, 0x5D, 0x50, 0x24, 0x5A, 0x30, 0x60,
0x25, 0x00, 0x3F, 0x50, 0x26, 0x0B, 0xED, 0xE0, 0x26, 0xD6, 0xE6, 0xD0, 0x27, 0xEB, 0xCF, 0xE0,
0x28, 0xC0, 0x03, 0x50, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xA9, 0x1F, 0xD0, 0x2B, 0xBB, 0x65, 0xE0,
0x2C, 0x89, 0x01, 0xD0, 0x2D, 0x9B, 0x47, 0xE0, 0x2E, 0x5F, 0xA9, 0x50, 0x2F, 0x7B, 0x29, 0xE0,
@@ -8199,7 +8199,7 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0xF9, 0xE1, 0xCA, 0x00, 0xFA, 0xF9, 0x39, 0xF0, 0xFB, 0x27, 0x42, 0x50, 0x08, 0x7C, 0x8B, 0xE0,
0x08, 0xFD, 0xB0, 0xD0, 0x09, 0xF6, 0xEA, 0x60, 0x0A, 0xA6, 0x33, 0xD0, 0x1C, 0xBE, 0xF8, 0xE0,
0x1D, 0x89, 0xF1, 0xD0, 0x1E, 0xCC, 0xFF, 0x60, 0x1F, 0x60, 0x99, 0x50, 0x20, 0x82, 0xB1, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5D, 0x4D, 0x60, 0x23, 0x1F, 0x0B, 0xD0, 0x24, 0x5A, 0x30, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5E, 0x9E, 0xE0, 0x23, 0x20, 0x5D, 0x50, 0x24, 0x5A, 0x30, 0x60,
0x25, 0x00, 0x3F, 0x50, 0x26, 0x0B, 0xED, 0xE0, 0x26, 0xD6, 0xE6, 0xD0, 0x27, 0xEB, 0xCF, 0xE0,
0x28, 0xC0, 0x03, 0x50, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xA9, 0x1F, 0xD0, 0x2B, 0xBB, 0x65, 0xE0,
0x2C, 0x89, 0x01, 0xD0, 0x2D, 0x9B, 0x47, 0xE0, 0x2E, 0x5F, 0xA9, 0x50, 0x2F, 0x7B, 0x29, 0xE0,
@@ -8375,7 +8375,7 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10,
0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90,
0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10, 0x54, 0x4C, 0x47, 0x90,
0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10,
0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10,
0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10,
@@ -8445,7 +8445,7 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0xE7, 0x11, 0xD2, 0x80, 0xE8, 0x27, 0xFF, 0x00, 0xE8, 0xE8, 0x4F, 0xD0, 0x08, 0x7C, 0x8B, 0xE0,
0x08, 0xFD, 0xB0, 0xD0, 0x09, 0xF6, 0xEA, 0x60, 0x0A, 0xA6, 0x33, 0xD0, 0x1C, 0xBE, 0xF8, 0xE0,
0x1D, 0x89, 0xF1, 0xD0, 0x1E, 0xCC, 0xFF, 0x60, 0x1F, 0x60, 0x99, 0x50, 0x20, 0x82, 0xB1, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5D, 0x4D, 0x60, 0x23, 0x1F, 0x0B, 0xD0, 0x24, 0x5A, 0x30, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5E, 0x9E, 0xE0, 0x23, 0x20, 0x5D, 0x50, 0x24, 0x5A, 0x30, 0x60,
0x25, 0x00, 0x3F, 0x50, 0x26, 0x0B, 0xED, 0xE0, 0x26, 0xD6, 0xE6, 0xD0, 0x27, 0xEB, 0xCF, 0xE0,
0x28, 0xC0, 0x03, 0x50, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xA9, 0x1F, 0xD0, 0x2B, 0xBB, 0x65, 0xE0,
0x2C, 0x89, 0x01, 0xD0, 0x2D, 0x9B, 0x47, 0xE0, 0x2E, 0x5F, 0xA9, 0x50, 0x2F, 0x7B, 0x29, 0xE0,
@@ -9314,7 +9314,7 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0xE7, 0x11, 0xD2, 0x80, 0xE8, 0x27, 0xFF, 0x00, 0xE8, 0xE8, 0x4F, 0xD0, 0x08, 0x7C, 0x8B, 0xE0,
0x08, 0xFD, 0xB0, 0xD0, 0x09, 0xF6, 0xEA, 0x60, 0x0A, 0xA6, 0x33, 0xD0, 0x1C, 0xBE, 0xF8, 0xE0,
0x1D, 0x89, 0xF1, 0xD0, 0x1E, 0xCC, 0xFF, 0x60, 0x1F, 0x60, 0x99, 0x50, 0x20, 0x82, 0xB1, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5D, 0x4D, 0x60, 0x23, 0x1F, 0x0B, 0xD0, 0x24, 0x5A, 0x30, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5E, 0x9E, 0xE0, 0x23, 0x20, 0x5D, 0x50, 0x24, 0x5A, 0x30, 0x60,
0x25, 0x00, 0x3F, 0x50, 0x26, 0x0B, 0xED, 0xE0, 0x26, 0xD6, 0xE6, 0xD0, 0x27, 0xEB, 0xCF, 0xE0,
0x28, 0xC0, 0x03, 0x50, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xA9, 0x1F, 0xD0, 0x2B, 0xBB, 0x65, 0xE0,
0x2C, 0x89, 0x01, 0xD0, 0x2D, 0x9B, 0x47, 0xE0, 0x2E, 0x5F, 0xA9, 0x50, 0x2F, 0x7B, 0x29, 0xE0,
@@ -13595,7 +13595,7 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10,
0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90,
0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10, 0x54, 0x4C, 0x47, 0x90,
0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10,
0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10,
0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10,
@@ -13756,54 +13756,54 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
/* Europe/Kiev */
0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1E, 0xAA, 0x19, 0xA7, 0x64,
0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1E, 0xAA, 0x19, 0xA7, 0x64,
0xB5, 0xA4, 0x19, 0x60, 0xCA, 0xCD, 0x2E, 0xD0, 0xCC, 0xE7, 0x4B, 0x10, 0xCD, 0xA9, 0x17, 0x90,
0xCE, 0xA2, 0x43, 0x10, 0xCE, 0xCD, 0xA8, 0x70, 0x15, 0x27, 0xA7, 0xD0, 0x16, 0x18, 0xDC, 0x40,
0x17, 0x08, 0xDB, 0x50, 0x17, 0xFA, 0x0F, 0xC0, 0x18, 0xEA, 0x0E, 0xD0, 0x19, 0xDB, 0x43, 0x40,
0x1A, 0xCC, 0x93, 0xD0, 0x1B, 0xBC, 0xA0, 0xF0, 0x1C, 0xAC, 0x91, 0xF0, 0x1D, 0x9C, 0x82, 0xF0,
0x1E, 0x8C, 0x73, 0xF0, 0x1F, 0x7C, 0x64, 0xF0, 0x20, 0x6C, 0x55, 0xF0, 0x21, 0x5C, 0x46, 0xF0,
0x22, 0x4C, 0x37, 0xF0, 0x23, 0x3C, 0x28, 0xF0, 0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0,
0x25, 0x9E, 0x73, 0x50, 0x26, 0x8D, 0x2E, 0xF0, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xC4, 0xCF, 0x50,
0x2B, 0xB4, 0xCE, 0x60, 0x2C, 0xA4, 0xB1, 0x50, 0x2D, 0x94, 0xB0, 0x60, 0x2E, 0x84, 0x93, 0x50,
0x2F, 0x74, 0xBC, 0x90, 0x30, 0x64, 0xAD, 0x90, 0x31, 0x5D, 0xD9, 0x10, 0x32, 0x72, 0xB4, 0x10,
0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10, 0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10,
0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, 0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90,
0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90, 0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90,
0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90, 0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10,
0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, 0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10,
0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10,
0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90,
0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90,
0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10,
0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10,
0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10,
0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, 0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90,
0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, 0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90,
0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, 0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90,
0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, 0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10,
0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, 0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10,
0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, 0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90,
0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, 0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90,
0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, 0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90,
0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, 0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x02, 0x06,
0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
0x07, 0x02, 0x01, 0x09, 0x01, 0x09, 0x01, 0x09, 0x01, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x00,
0x00, 0x1C, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00,
0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x1C,
0x20, 0x01, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00,
0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01,
0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D,
0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00,
0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0xD6, 0x48,
0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F,
0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
0x26, 0x0B, 0xFB, 0xF0, 0x26, 0x8D, 0x20, 0xE0, 0x28, 0xE5, 0x17, 0x80, 0x29, 0xD4, 0xEC, 0x60,
0x2A, 0xC4, 0xCF, 0x50, 0x2B, 0xB4, 0xCE, 0x60, 0x2C, 0xA4, 0xB1, 0x50, 0x2D, 0x94, 0xB0, 0x60,
0x2E, 0x84, 0x93, 0x50, 0x2F, 0x74, 0xBC, 0x90, 0x30, 0x64, 0xAD, 0x90, 0x31, 0x5D, 0xD9, 0x10,
0x32, 0x72, 0xB4, 0x10, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10, 0x35, 0x1D, 0x9D, 0x10,
0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, 0x38, 0xDD, 0x61, 0x10,
0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90, 0x3C, 0xA6, 0x5F, 0x90,
0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90, 0x40, 0x66, 0x23, 0x90,
0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, 0x44, 0x25, 0xE7, 0x90,
0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10,
0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x6C, 0x90,
0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90,
0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90,
0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10,
0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, 0x62, 0x3F, 0xB7, 0x10,
0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, 0x66, 0x08, 0xB5, 0x90,
0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, 0x69, 0xC8, 0x79, 0x90,
0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, 0x6D, 0x88, 0x3D, 0x90,
0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, 0x71, 0x51, 0x3C, 0x10,
0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, 0x75, 0x11, 0x00, 0x10,
0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, 0x78, 0xD0, 0xC4, 0x10,
0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, 0x7C, 0x99, 0xC2, 0x90,
0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, 0x01, 0x02, 0x05, 0x03,
0x04, 0x03, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x09, 0x01, 0x09, 0x01, 0x09, 0x01, 0x09, 0x01, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x00, 0x00, 0x1C, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04,
0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20,
0x01, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00,
0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x19,
0x00, 0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4B, 0x4D, 0x54, 0x00,
0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54,
0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x00, 0xD6, 0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F,
0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
/* Europe/Lisbon */
0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16255,7 +16255,7 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0xE7, 0x11, 0xD2, 0x80, 0xE8, 0x27, 0xFF, 0x00, 0xE8, 0xE8, 0x4F, 0xD0, 0x08, 0x7C, 0x8B, 0xE0,
0x08, 0xFD, 0xB0, 0xD0, 0x09, 0xF6, 0xEA, 0x60, 0x0A, 0xA6, 0x33, 0xD0, 0x1C, 0xBE, 0xF8, 0xE0,
0x1D, 0x89, 0xF1, 0xD0, 0x1E, 0xCC, 0xFF, 0x60, 0x1F, 0x60, 0x99, 0x50, 0x20, 0x82, 0xB1, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5D, 0x4D, 0x60, 0x23, 0x1F, 0x0B, 0xD0, 0x24, 0x5A, 0x30, 0x60,
0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5E, 0x9E, 0xE0, 0x23, 0x20, 0x5D, 0x50, 0x24, 0x5A, 0x30, 0x60,
0x25, 0x00, 0x3F, 0x50, 0x26, 0x0B, 0xED, 0xE0, 0x26, 0xD6, 0xE6, 0xD0, 0x27, 0xEB, 0xCF, 0xE0,
0x28, 0xC0, 0x03, 0x50, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xA9, 0x1F, 0xD0, 0x2B, 0xBB, 0x65, 0xE0,
0x2C, 0x89, 0x01, 0xD0, 0x2D, 0x9B, 0x47, 0xE0, 0x2E, 0x5F, 0xA9, 0x50, 0x2F, 0x7B, 0x29, 0xE0,
@@ -17003,18 +17003,18 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0x36, 0x3B, 0x17, 0xE0, 0x36, 0xD7, 0xFA, 0x60, 0x38, 0x24, 0x34, 0x60, 0x38, 0xB7, 0xDC, 0x60,
0x4B, 0x11, 0x2C, 0xE0, 0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xC2, 0xEA, 0x60, 0x4D, 0x72, 0x41, 0xE0,
0x4E, 0xA2, 0xCC, 0x60, 0x4F, 0x1A, 0xC4, 0xE0, 0x50, 0x82, 0xAE, 0x60, 0x50, 0xFA, 0xA6, 0xE0,
0x52, 0x6B, 0xCA, 0xE0, 0x52, 0xDA, 0x88, 0xE0, 0x54, 0x4B, 0xAC, 0xE0, 0x54, 0xBA, 0x6A, 0xE0,
0x56, 0x2B, 0x8E, 0xE0, 0x56, 0xA3, 0x87, 0x60, 0x58, 0x0B, 0x70, 0xE0, 0x58, 0x83, 0x69, 0x60,
0x59, 0xEB, 0x52, 0xE0, 0x5A, 0x63, 0x4B, 0x60, 0x5B, 0xCB, 0x34, 0xE0, 0x5C, 0x43, 0x2D, 0x60,
0x5D, 0xB4, 0x51, 0x60, 0x5E, 0x23, 0x0F, 0x60, 0x5F, 0x94, 0x33, 0x60, 0x60, 0x0C, 0x2B, 0xE0,
0x61, 0x74, 0x15, 0x60, 0x61, 0xEC, 0x0D, 0xE0, 0x63, 0x53, 0xF7, 0x60, 0x63, 0xCB, 0xEF, 0xE0,
0x65, 0x33, 0xD9, 0x60, 0x65, 0xAB, 0xD1, 0xE0, 0x67, 0x1C, 0xF5, 0xE0, 0x67, 0x8B, 0xB3, 0xE0,
0x68, 0xFC, 0xD7, 0xE0, 0x69, 0x6B, 0x95, 0xE0, 0x6A, 0xDC, 0xB9, 0xE0, 0x6B, 0x54, 0xB2, 0x60,
0x6C, 0xBC, 0x9B, 0xE0, 0x6D, 0x34, 0x94, 0x60, 0x6E, 0x9C, 0x7D, 0xE0, 0x6F, 0x14, 0x76, 0x60,
0x70, 0x7C, 0x5F, 0xE0, 0x70, 0xF4, 0x58, 0x60, 0x72, 0x65, 0x7C, 0x60, 0x72, 0xD4, 0x3A, 0x60,
0x74, 0x45, 0x5E, 0x60, 0x74, 0xB4, 0x1C, 0x60, 0x76, 0x25, 0x40, 0x60, 0x76, 0x9D, 0x38, 0xE0,
0x78, 0x05, 0x22, 0x60, 0x78, 0x7D, 0x1A, 0xE0, 0x79, 0xE5, 0x04, 0x60, 0x7A, 0x5C, 0xFC, 0xE0,
0x7B, 0xC4, 0xE6, 0x60, 0x7C, 0x3C, 0xDE, 0xE0, 0x7D, 0xAE, 0x02, 0xE0, 0x7E, 0x1C, 0xC0, 0xE0,
0x52, 0x6B, 0xCA, 0xE0, 0x52, 0xDA, 0x7A, 0xD0, 0x54, 0x4B, 0xAC, 0xE0, 0x54, 0xBA, 0x5C, 0xD0,
0x56, 0x2B, 0x8E, 0xE0, 0x56, 0xA3, 0x79, 0x50, 0x58, 0x0B, 0x70, 0xE0, 0x58, 0x83, 0x5B, 0x50,
0x59, 0xEB, 0x52, 0xE0, 0x5A, 0x63, 0x3D, 0x50, 0x5B, 0xCB, 0x34, 0xE0, 0x5C, 0x43, 0x1F, 0x50,
0x5D, 0xB4, 0x51, 0x60, 0x5E, 0x23, 0x01, 0x50, 0x5F, 0x94, 0x33, 0x60, 0x60, 0x0C, 0x1D, 0xD0,
0x61, 0x74, 0x15, 0x60, 0x61, 0xEB, 0xFF, 0xD0, 0x63, 0x53, 0xF7, 0x60, 0x63, 0xCB, 0xE1, 0xD0,
0x65, 0x33, 0xD9, 0x60, 0x65, 0xAB, 0xC3, 0xD0, 0x67, 0x1C, 0xF5, 0xE0, 0x67, 0x8B, 0xA5, 0xD0,
0x68, 0xFC, 0xD7, 0xE0, 0x69, 0x6B, 0x87, 0xD0, 0x6A, 0xDC, 0xB9, 0xE0, 0x6B, 0x54, 0xA4, 0x50,
0x6C, 0xBC, 0x9B, 0xE0, 0x6D, 0x34, 0x86, 0x50, 0x6E, 0x9C, 0x7D, 0xE0, 0x6F, 0x14, 0x68, 0x50,
0x70, 0x7C, 0x5F, 0xE0, 0x70, 0xF4, 0x4A, 0x50, 0x72, 0x65, 0x7C, 0x60, 0x72, 0xD4, 0x2C, 0x50,
0x74, 0x45, 0x5E, 0x60, 0x74, 0xB4, 0x0E, 0x50, 0x76, 0x25, 0x40, 0x60, 0x76, 0x9D, 0x2A, 0xD0,
0x78, 0x05, 0x22, 0x60, 0x78, 0x7D, 0x0C, 0xD0, 0x79, 0xE5, 0x04, 0x60, 0x7A, 0x5C, 0xEE, 0xD0,
0x7B, 0xC4, 0xE6, 0x60, 0x7C, 0x3C, 0xD0, 0xD0, 0x7D, 0xAE, 0x02, 0xE0, 0x7E, 0x1C, 0xB2, 0xD0,
0x7F, 0x8D, 0xE4, 0xE0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
@@ -17617,7 +17617,7 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10,
0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90,
0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90,
0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10, 0x54, 0x4C, 0x47, 0x90,
0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10,
0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10,
0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10,
@@ -18416,4 +18416,4 @@ const unsigned char timelib_timezone_db_data_builtin[261632] = {
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 = { "2013.9", 579, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
const timelib_tzdb timezonedb_builtin = { "2014.1", 579, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+11 -12
View File
@@ -28,7 +28,7 @@ static int month_tab[12] = { 0, 31, 59, 90, 120, 151, 181, 212, 24
static int days_in_month_leap[13] = { 31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
static int days_in_month[13] = { 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
static int do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, timelib_sll *a, timelib_sll *b)
static void do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, timelib_sll *a, timelib_sll *b)
{
if (*a < start) {
*b -= (start - *a - 1) / adj + 1;
@@ -38,7 +38,6 @@ static int do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, t
*b += *a / adj;
*a -= adj * (*a / adj);
}
return 0;
}
static void inc_month(timelib_sll *y, timelib_sll *m)
@@ -170,24 +169,24 @@ static void do_adjust_for_weekday(timelib_time* time)
void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt)
{
do {} while (do_range_limit(0, 60, 60, &rt->s, &rt->i));
do {} while (do_range_limit(0, 60, 60, &rt->i, &rt->h));
do {} while (do_range_limit(0, 24, 24, &rt->h, &rt->d));
do {} while (do_range_limit(0, 12, 12, &rt->m, &rt->y));
do_range_limit(0, 60, 60, &rt->s, &rt->i);
do_range_limit(0, 60, 60, &rt->i, &rt->h);
do_range_limit(0, 24, 24, &rt->h, &rt->d);
do_range_limit(0, 12, 12, &rt->m, &rt->y);
do_range_limit_days_relative(&base->y, &base->m, &rt->y, &rt->m, &rt->d, rt->invert);
do {} while (do_range_limit(0, 12, 12, &rt->m, &rt->y));
do_range_limit(0, 12, 12, &rt->m, &rt->y);
}
void timelib_do_normalize(timelib_time* time)
{
if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 60, 60, &time->s, &time->i));
if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 60, 60, &time->i, &time->h));
if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 24, 24, &time->h, &time->d));
do {} while (do_range_limit(1, 13, 12, &time->m, &time->y));
if (time->s != TIMELIB_UNSET) do_range_limit(0, 60, 60, &time->s, &time->i);
if (time->s != TIMELIB_UNSET) do_range_limit(0, 60, 60, &time->i, &time->h);
if (time->s != TIMELIB_UNSET) do_range_limit(0, 24, 24, &time->h, &time->d);
do_range_limit(1, 13, 12, &time->m, &time->y);
do {} while (do_range_limit_days(&time->y, &time->m, &time->d));
do {} while (do_range_limit(1, 13, 12, &time->m, &time->y));
do_range_limit(1, 13, 12, &time->m, &time->y);
}
static void do_adjust_relative(timelib_time* time)
+21281 -21281
View File
File diff suppressed because it is too large. Load diff
+154 -22
View File
@@ -3000,7 +3000,7 @@ diff -u libmagic.orig/readelf.h libmagic/readelf.h
typedef uint8_t Elf64_Char;
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
--- libmagic.orig/softmagic.c Thu Mar 21 18:45:14 2013
+++ libmagic/softmagic.c Thu Feb 20 18:57:46 2014
+++ libmagic/softmagic.c Mon Mar 10 14:03:18 2014
@@ -41,6 +41,11 @@
#include <stdlib.h>
#include <time.h>
@@ -3013,7 +3013,16 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int match(struct magic_set *, struct magic *, uint32_t,
const unsigned char *, size_t, size_t, int, int, int, int, int *, int *,
@@ -69,13 +74,13 @@
@@ -62,6 +67,8 @@
private void cvt_32(union VALUETYPE *, const struct magic *);
private void cvt_64(union VALUETYPE *, const struct magic *);
+#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
+
/*
* softmagic - lookup one file in parsed, in-memory copy of database
* Passed the name and FILE * of one file to be typed.
@@ -69,13 +76,13 @@
/*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */
protected int
file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
@@ -3029,7 +3038,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
NULL)) != 0)
return rv;
@@ -132,7 +137,7 @@
@@ -132,7 +139,7 @@
struct magic *m = &magic[magindex];
if (m->type != FILE_NAME)
@@ -3038,7 +3047,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
#define FLT (STRING_BINTEST | STRING_TEXTTEST)
((text && (m->str_flags & FLT) == STRING_BINTEST) ||
(!text && (m->str_flags & FLT) == STRING_TEXTTEST))) ||
@@ -209,8 +214,8 @@
@@ -209,8 +216,8 @@
if (file_check_mem(ms, ++cont_level) == -1)
return -1;
@@ -3049,7 +3058,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
m = &magic[magindex];
ms->line = m->lineno; /* for messages */
@@ -335,44 +340,22 @@
@@ -335,44 +342,22 @@
private int
check_fmt(struct magic_set *ms, struct magic *m)
{
@@ -3104,7 +3113,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int32_t
mprint(struct magic_set *ms, struct magic *m)
{
@@ -583,13 +566,13 @@
@@ -583,13 +568,13 @@
char *cp;
int rval;
@@ -3120,7 +3129,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
if (rval == -1)
return -1;
@@ -835,16 +818,16 @@
@@ -835,16 +820,16 @@
if (m->num_mask) \
switch (m->mask_op & FILE_OPS_MASK) { \
case FILE_OPADD: \
@@ -3141,7 +3150,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
break; \
} \
@@ -1145,9 +1128,6 @@
@@ -1145,9 +1130,6 @@
"nbytes=%zu, count=%u)\n", m->type, m->flag, offset, o,
nbytes, count);
mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE));
@@ -3151,7 +3160,79 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
if (m->flag & INDIR) {
@@ -1644,16 +1624,13 @@
@@ -1191,7 +1173,7 @@
}
switch (cvt_flip(m->in_type, flip)) {
case FILE_BYTE:
- if (nbytes < (offset + 1))
+ if (OFFSET_OOB(nbytes, offset, 1))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1226,7 +1208,7 @@
offset = ~offset;
break;
case FILE_BESHORT:
- if (nbytes < (offset + 2))
+ if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1278,7 +1260,7 @@
offset = ~offset;
break;
case FILE_LESHORT:
- if (nbytes < (offset + 2))
+ if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1330,7 +1312,7 @@
offset = ~offset;
break;
case FILE_SHORT:
- if (nbytes < (offset + 2))
+ if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1367,7 +1349,7 @@
break;
case FILE_BELONG:
case FILE_BEID3:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1438,7 +1420,7 @@
break;
case FILE_LELONG:
case FILE_LEID3:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1508,7 +1490,7 @@
offset = ~offset;
break;
case FILE_MELONG:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1578,7 +1560,7 @@
offset = ~offset;
break;
case FILE_LONG:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1644,23 +1626,20 @@
if ((ms->flags & MAGIC_DEBUG) != 0) {
mdebug(offset, (char *)(void *)p,
sizeof(union VALUETYPE));
@@ -3165,20 +3246,57 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
switch (m->type) {
case FILE_BYTE:
- if (nbytes < (offset + 1)) /* should alway be true */
+ if (nbytes < (offset + 1)) /* should always be true */
+ if (OFFSET_OOB(nbytes, offset, 1))
return 0;
break;
@@ -1703,6 +1680,8 @@
case FILE_SHORT:
case FILE_BESHORT:
case FILE_LESHORT:
- if (nbytes < (offset + 2))
+ if (OFFSET_OOB(nbytes, offset, 2))
return 0;
break;
@@ -1679,38 +1658,40 @@
case FILE_FLOAT:
case FILE_BEFLOAT:
case FILE_LEFLOAT:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
break;
case FILE_DOUBLE:
case FILE_BEDOUBLE:
case FILE_LEDOUBLE:
- if (nbytes < (offset + 8))
+ if (OFFSET_OOB(nbytes, offset, 8))
return 0;
break;
case FILE_STRING:
case FILE_PSTRING:
case FILE_SEARCH:
- if (nbytes < (offset + m->vallen))
+ if (OFFSET_OOB(nbytes, offset, m->vallen))
return 0;
break;
case FILE_REGEX:
- if (nbytes < offset)
+ if (OFFSET_OOB(nbytes, offset, 0))
return 0;
break;
case FILE_INDIRECT:
- if (nbytes < offset)
+ if (offset == 0)
+ return 0;
if (nbytes < offset)
+ if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = ms->o.buf;
@@ -1710,19 +1689,21 @@
soffset = ms->offset;
ms->o.buf = NULL;
ms->offset = 0;
rv = file_softmagic(ms, s + offset, nbytes - offset,
@@ -3187,24 +3305,38 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
if ((ms->flags & MAGIC_DEBUG) != 0)
fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
rbuf = ms->o.buf;
ms->o.buf = sbuf;
@@ -1718,16 +1699,26 @@
ms->offset = soffset;
if (rv == 1) {
- if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
+ if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
file_printf(ms, m->desc, offset) == -1)
- return -1;
+ return -1;
if (file_printf(ms, "%s", rbuf) == -1)
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
- file_printf(ms, m->desc, offset) == -1)
+ file_printf(ms, m->desc, offset) == -1) {
+ if (rbuf) {
+ efree(rbuf);
+ }
return -1;
- if (file_printf(ms, "%s", rbuf) == -1)
+ }
+ if (file_printf(ms, "%s", rbuf) == -1) {
+ if (rbuf) {
+ efree(rbuf);
+ }
return -1;
- free(rbuf);
+ }
+ }
+ if (rbuf) {
+ efree(rbuf);
}
return rv;
@@ -1837,6 +1818,42 @@
case FILE_USE:
- if (nbytes < offset)
+ if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = m->value.s;
if (*sbuf == '^') {
@@ -1837,6 +1828,42 @@
return file_strncmp(a, b, len, flags);
}
@@ -3247,7 +3379,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int
magiccheck(struct magic_set *ms, struct magic *m)
{
@@ -1996,69 +2013,157 @@
@@ -1996,69 +2023,157 @@
break;
}
case FILE_REGEX: {
+30 -20
View File
@@ -67,6 +67,8 @@ private void cvt_16(union VALUETYPE *, const struct magic *);
private void cvt_32(union VALUETYPE *, const struct magic *);
private void cvt_64(union VALUETYPE *, const struct magic *);
#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
/*
* softmagic - lookup one file in parsed, in-memory copy of database
* Passed the name and FILE * of one file to be typed.
@@ -1171,7 +1173,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
}
switch (cvt_flip(m->in_type, flip)) {
case FILE_BYTE:
if (nbytes < (offset + 1))
if (OFFSET_OOB(nbytes, offset, 1))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1206,7 +1208,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_BESHORT:
if (nbytes < (offset + 2))
if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1258,7 +1260,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_LESHORT:
if (nbytes < (offset + 2))
if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1310,7 +1312,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_SHORT:
if (nbytes < (offset + 2))
if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1347,7 +1349,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
break;
case FILE_BELONG:
case FILE_BEID3:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1418,7 +1420,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
break;
case FILE_LELONG:
case FILE_LEID3:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1488,7 +1490,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_MELONG:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1558,7 +1560,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_LONG:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1630,14 +1632,14 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
/* Verify we have enough data to match magic type */
switch (m->type) {
case FILE_BYTE:
if (nbytes < (offset + 1)) /* should always be true */
if (OFFSET_OOB(nbytes, offset, 1))
return 0;
break;
case FILE_SHORT:
case FILE_BESHORT:
case FILE_LESHORT:
if (nbytes < (offset + 2))
if (OFFSET_OOB(nbytes, offset, 2))
return 0;
break;
@@ -1656,33 +1658,33 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
case FILE_FLOAT:
case FILE_BEFLOAT:
case FILE_LEFLOAT:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
break;
case FILE_DOUBLE:
case FILE_BEDOUBLE:
case FILE_LEDOUBLE:
if (nbytes < (offset + 8))
if (OFFSET_OOB(nbytes, offset, 8))
return 0;
break;
case FILE_STRING:
case FILE_PSTRING:
case FILE_SEARCH:
if (nbytes < (offset + m->vallen))
if (OFFSET_OOB(nbytes, offset, m->vallen))
return 0;
break;
case FILE_REGEX:
if (nbytes < offset)
if (OFFSET_OOB(nbytes, offset, 0))
return 0;
break;
case FILE_INDIRECT:
if (offset == 0)
return 0;
if (nbytes < offset)
if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = ms->o.buf;
soffset = ms->offset;
@@ -1696,11 +1698,19 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
ms->o.buf = sbuf;
ms->offset = soffset;
if (rv == 1) {
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
file_printf(ms, m->desc, offset) == -1)
return -1;
if (file_printf(ms, "%s", rbuf) == -1)
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
file_printf(ms, m->desc, offset) == -1) {
if (rbuf) {
efree(rbuf);
}
return -1;
}
if (file_printf(ms, "%s", rbuf) == -1) {
if (rbuf) {
efree(rbuf);
}
return -1;
}
}
if (rbuf) {
efree(rbuf);
@@ -1708,7 +1718,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
return rv;
case FILE_USE:
if (nbytes < offset)
if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = m->value.s;
if (*sbuf == '^') {
+39
View File
@@ -0,0 +1,39 @@
Patches applied to file sources tree before generating magic.mgc
and before running create_data_file.php to create data_file.c.
From ef2329cf71acb59204dd981e2c6cce6c81fe467c Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Mon, 25 Mar 2013 14:06:55 +0000
Subject: [PATCH] limit to 100 repetitions to avoid excessive backtracking
Carsten Wolff
---
magic/Magdir/commands | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
index 67c3eee..4a7d8dd 100644
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: commands,v 1.44 2013/02/05 15:20:47 christos Exp $
+# $File: commands,v 1.45 2013/02/06 14:18:52 christos Exp $
# commands: file(1) magic for various shells and interpreters
#
#0 string/w : shell archive or script for antique kernel text
@@ -49,7 +49,7 @@
!:mime text/x-awk
0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
-0 regex =^\\s*BEGIN\\s*[{] awk script text
+0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
# AT&T Bell Labs' Plan 9 shell
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
--
1.8.5.5
+12 -27
View File
@@ -5101,40 +5101,24 @@ PHP_FUNCTION(imagescale)
{
zval *IM;
gdImagePtr im;
gdImagePtr im_scaled;
int new_width, new_height = -1;
gdInterpolationMethod method = GD_BILINEAR_FIXED;
gdImagePtr im_scaled = NULL;
int new_width, new_height;
long tmp_w, tmp_h=-1, tmp_m = GD_BILINEAR_FIXED;
gdInterpolationMethod method;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|ll", &IM, &new_width, &new_height, &method) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|ll", &IM, &tmp_w, &tmp_h, &tmp_m) == FAILURE) {
return;
}
method = tmp_m;
new_width = tmp_w;
new_height = tmp_h;
ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);
im_scaled = gdImageScale(im, new_width, new_height);
goto finish;
switch (method) {
case GD_NEAREST_NEIGHBOUR:
im_scaled = gdImageScaleNearestNeighbour(im, new_width, new_height);
break;
case GD_BILINEAR_FIXED:
im_scaled = gdImageScaleBilinear(im, new_width, new_height);
break;
case GD_BICUBIC:
im_scaled = gdImageScaleBicubicFixed(im, new_width, new_height);
break;
case GD_BICUBIC_FIXED:
im_scaled = gdImageScaleBicubicFixed(im, new_width, new_height);
break;
default:
im_scaled = gdImageScaleTwoPass(im, im->sx, im->sy, new_width, new_height);
break;
if (gdImageSetInterpolationMethod(im, method)) {
im_scaled = gdImageScale(im, new_width, new_height);
}
finish:
if (im_scaled == NULL) {
RETURN_FALSE;
} else {
@@ -5298,6 +5282,7 @@ PHP_FUNCTION(imageaffinematrixget)
double x, y;
if (Z_TYPE_P(options) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array expected as options");
RETURN_FALSE;
}
if (zend_hash_find(HASH_OF(options), "x", sizeof("x"), (void **)&tmp) != FAILURE) {
if (Z_TYPE_PP(tmp) != IS_DOUBLE) {
+6 -8
View File
@@ -45,22 +45,20 @@ gdImagePtr gdImageCrop(gdImagePtr src, const gdRectPtr crop)
gdImagePtr dst;
int y;
/* check size */
if (crop->width<=0 || crop->height<=0) {
return NULL;
}
/* allocate the requested size (could be only partially filled) */
if (src->trueColor) {
dst = gdImageCreateTrueColor(crop->width, crop->height);
if (dst == NULL) {
return NULL;
}
gdImageSaveAlpha(dst, 1);
} else {
dst = gdImageCreate(crop->width, crop->height);
if (dst == NULL) {
return NULL;
}
gdImagePaletteCopy(dst, src);
}
if (dst == NULL) {
return NULL;
}
dst->transparent = src->transparent;
/* check position in the src image */
+7 -10
View File
@@ -1324,8 +1324,8 @@ static gdImagePtr gdImageScaleBilinearTC(gdImagePtr im, const unsigned int new_w
gdFixed f_j = gd_itofx(j);
gdFixed f_a = gd_mulfx(f_i, f_dy);
gdFixed f_b = gd_mulfx(f_j, f_dx);
const long m = gd_fxtoi(f_a);
const long n = gd_fxtoi(f_b);
const gdFixed m = gd_fxtoi(f_a);
const gdFixed n = gd_fxtoi(f_b);
gdFixed f_f = f_a - gd_itofx(m);
gdFixed f_g = f_b - gd_itofx(n);
@@ -1365,10 +1365,10 @@ static gdImagePtr gdImageScaleBilinearTC(gdImagePtr im, const unsigned int new_w
f_a3 = gd_itofx(gdTrueColorGetAlpha(pixel3));
f_a4 = gd_itofx(gdTrueColorGetAlpha(pixel4));
{
const char red = (char) gd_fxtoi(gd_mulfx(f_w1, f_r1) + gd_mulfx(f_w2, f_r2) + gd_mulfx(f_w3, f_r3) + gd_mulfx(f_w4, f_r4));
const char green = (char) gd_fxtoi(gd_mulfx(f_w1, f_g1) + gd_mulfx(f_w2, f_g2) + gd_mulfx(f_w3, f_g3) + gd_mulfx(f_w4, f_g4));
const char blue = (char) gd_fxtoi(gd_mulfx(f_w1, f_b1) + gd_mulfx(f_w2, f_b2) + gd_mulfx(f_w3, f_b3) + gd_mulfx(f_w4, f_b4));
const char alpha = (char) gd_fxtoi(gd_mulfx(f_w1, f_a1) + gd_mulfx(f_w2, f_a2) + gd_mulfx(f_w3, f_a3) + gd_mulfx(f_w4, f_a4));
const unsigned char red = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_r1) + gd_mulfx(f_w2, f_r2) + gd_mulfx(f_w3, f_r3) + gd_mulfx(f_w4, f_r4));
const unsigned char green = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_g1) + gd_mulfx(f_w2, f_g2) + gd_mulfx(f_w3, f_g3) + gd_mulfx(f_w4, f_g4));
const unsigned char blue = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_b1) + gd_mulfx(f_w2, f_b2) + gd_mulfx(f_w3, f_b3) + gd_mulfx(f_w4, f_b4));
const unsigned char alpha = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_a1) + gd_mulfx(f_w2, f_a2) + gd_mulfx(f_w3, f_a3) + gd_mulfx(f_w4, f_a4));
new_img->tpixels[dst_offset_v][dst_offset_h] = gdTrueColorAlpha(red, green, blue, alpha);
}
@@ -2472,10 +2472,7 @@ int gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id)
switch (id) {
case GD_DEFAULT:
im->interpolation_id = GD_BILINEAR_FIXED;
im->interpolation = NULL;
break;
id = GD_BILINEAR_FIXED;
/* Optimized versions */
case GD_BILINEAR_FIXED:
case GD_BICUBIC_FIXED:
+4
View File
@@ -122,6 +122,10 @@ const char * gdJpegGetVersionString()
return "8";
break;
case 90:
return "9 compatible";
break;
default:
return "unknown";
}
+10 -1
View File
@@ -24,6 +24,8 @@ var_dump(imagecrop($img, array("x" => -20, "y" => -20, "width" => 10, "height" =
// POC #4
var_dump(imagecrop($img, array("x" => 0x7fffff00, "y" => 0, "width" => 10, "height" => 10)));
// bug 66815
var_dump(imagecrop($img, array("x" => 0, "y" => 0, "width" => 65535, "height" => 65535)));
?>
--EXPECTF--
resource(%d) of type (gd)
@@ -35,6 +37,13 @@ Array
[width] => 10
[height] => 10
)
Warning: imagecrop(): gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
in %sbug66356.php on line %d
bool(false)
resource(%d) of type (gd)
resource(%d) of type (gd)
resource(%d) of type (gd)
Warning: imagecrop(): gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
in %sbug66356.php on line %d
bool(false)
+1
View File
@@ -1529,6 +1529,7 @@ ZEND_FUNCTION(gmp_testbit)
if (mpz_tstbit(*gmpnum_a, index)) {
RETURN_TRUE;
}
RETURN_FALSE;
}
/* }}} */
+5 -6
View File
@@ -609,16 +609,15 @@ Generate a PBKDF2 hash of the given password and salt
Returns lowercase hexits by default */
PHP_FUNCTION(hash_pbkdf2)
{
char *returnval, *algo, *salt, *pass = NULL;
unsigned char *computed_salt, *digest, *temp, *result, *K1, *K2 = NULL;
long loops, i, j, algo_len, pass_len, iterations, length, digest_length = 0;
int argc, salt_len = 0;
char *returnval, *algo, *salt, *pass;
unsigned char *computed_salt, *digest, *temp, *result, *K1, *K2;
long loops, i, j, iterations, length = 0, digest_length;
int algo_len, pass_len, salt_len;
zend_bool raw_output = 0;
const php_hash_ops *ops;
void *context;
argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "sssl|lb", &algo, &algo_len, &pass, &pass_len, &salt, &salt_len, &iterations, &length, &raw_output) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssl|lb", &algo, &algo_len, &pass, &pass_len, &salt, &salt_len, &iterations, &length, &raw_output) == FAILURE) {
return;
}
+5 -1
View File
@@ -5,7 +5,7 @@ Test hash_pbkdf2() function : basic functionality
--FILE--
<?php
/* Prototype : string hash_hmac ( string $algo , string $data , string $key [, bool $raw_output ] )
/* Prototype : string hash_hmac(string $algo, string $data, string $key [, int $length = 0 [, bool $raw_output = false]])
* Description: Generate a keyed hash value using the HMAC method
* Source code: ext/hash/hash.c
* Alias to functions:
@@ -14,10 +14,12 @@ Test hash_pbkdf2() function : basic functionality
echo "*** Testing hash_pbkdf2() : basic functionality ***\n";
echo "sha1: " . hash_pbkdf2('sha1', 'password', 'salt', 1, 20)."\n";
echo "sha1(no length): " . hash_pbkdf2('sha1', 'password', 'salt', 1)."\n";
echo "sha1(raw): " . bin2hex(hash_pbkdf2('sha1', 'password', 'salt', 1, 20, TRUE))."\n";
echo "sha1(rounds): " . hash_pbkdf2('sha1', 'passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 4096, 25)."\n";
echo "sha1(rounds)(raw): " . bin2hex(hash_pbkdf2('sha1', 'passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 4096, 25, TRUE))."\n";
echo "sha256: " . hash_pbkdf2('sha256', 'password', 'salt', 1, 20)."\n";
echo "sha256(no length): " . hash_pbkdf2('sha256', 'password', 'salt', 1)."\n";
echo "sha256(raw): " . bin2hex(hash_pbkdf2('sha256', 'password', 'salt', 1, 20, TRUE))."\n";
echo "sha256(rounds): " . hash_pbkdf2('sha256', 'passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 4096, 40)."\n";
echo "sha256(rounds)(raw): " . bin2hex(hash_pbkdf2('sha256', 'passwordPASSWORDpassword', 'saltSALTsaltSALTsaltSALTsaltSALTsalt', 4096, 40, TRUE))."\n";
@@ -27,10 +29,12 @@ echo "sha256(rounds)(raw): " . bin2hex(hash_pbkdf2('sha256', 'passwordPASSWORDpa
--EXPECT--
*** Testing hash_pbkdf2() : basic functionality ***
sha1: 0c60c80f961f0e71f3a9
sha1(no length): 0c60c80f961f0e71f3a9b524af6012062fe037a6
sha1(raw): 0c60c80f961f0e71f3a9b524af6012062fe037a6
sha1(rounds): 3d2eec4fe41c849b80c8d8366
sha1(rounds)(raw): 3d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038
sha256: 120fb6cffcf8b32c43e7
sha256(no length): 120fb6cffcf8b32c43e7225256c4f837a86548c92ccc35480805987cb70be17b
sha256(raw): 120fb6cffcf8b32c43e7225256c4f837a86548c9
sha256(rounds): 348c89dbcbd32b2f32d814b8116e84cf2b17347e
sha256(rounds)(raw): 348c89dbcbd32b2f32d814b8116e84cf2b17347ebc1800181c4e2a1fb8dd53e1c635518c7dac47e9
+16 -6
View File
@@ -57,6 +57,8 @@ static inline void php_converter_throw_failure(php_converter_object *objval, UEr
/* {{{ php_converter_default_callback */
static void php_converter_default_callback(zval *return_value, zval *zobj, long reason, zval *error TSRMLS_DC) {
zval_dtor(error);
ZVAL_LONG(error, U_ZERO_ERROR);
/* Basic functionality so children can call parent::toUCallback() */
switch (reason) {
case UCNV_UNASSIGNED:
@@ -66,7 +68,16 @@ static void php_converter_default_callback(zval *return_value, zval *zobj, long
php_converter_object *objval = (php_converter_object*)CONV_GET(zobj);
char chars[127];
int8_t chars_len = sizeof(chars);
UErrorCode error = U_ZERO_ERROR;
UErrorCode uerror = U_ZERO_ERROR;
if(!objval->src) {
php_converter_throw_failure(objval, U_INVALID_STATE_ERROR TSRMLS_CC, "Source Converter has not been initialized yet");
chars[0] = 0x1A;
chars[1] = 0;
chars_len = 1;
ZVAL_LONG(error, U_INVALID_STATE_ERROR);
RETVAL_STRINGL(chars, chars_len, 1);
return;
}
/* Yes, this is fairly wasteful at first glance,
* but considering that the alternative is to store
@@ -75,18 +86,17 @@ static void php_converter_default_callback(zval *return_value, zval *zobj, long
* I'd rather take the CPU hit here, than waste time
* storing a value I'm unlikely to use.
*/
ucnv_getSubstChars(objval->src, chars, &chars_len, &error);
if (U_FAILURE(error)) {
THROW_UFAILURE(objval, "ucnv_getSubstChars", error);
ucnv_getSubstChars(objval->src, chars, &chars_len, &uerror);
if (U_FAILURE(uerror)) {
THROW_UFAILURE(objval, "ucnv_getSubstChars", uerror);
chars[0] = 0x1A;
chars[1] = 0;
chars_len = 1;
ZVAL_LONG(error, uerror);
}
RETVAL_STRINGL(chars, chars_len, 1);
}
}
zval_dtor(error);
ZVAL_LONG(error, U_ZERO_ERROR);
}
/* }}} */
+11
View File
@@ -0,0 +1,11 @@
--TEST--
Bug #66873 - crash in UConverter with invalid encoding
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php
$o = new UConverter(1, 1);
$o->toUCallback(1, 1, 1, $b);
var_dump($o->getErrorCode());
--EXPECT--
int(27)
+8 -1
View File
@@ -176,8 +176,11 @@ void php_clear_stmt_bind(MY_STMT *stmt TSRMLS_DC)
php_free_stmt_bind_buffer(stmt->param, FETCH_SIMPLE);
/* Clean output bind */
php_free_stmt_bind_buffer(stmt->result, FETCH_RESULT);
#endif
if (stmt->link_handle) {
zend_objects_store_del_ref_by_handle(stmt->link_handle TSRMLS_CC);
}
#endif
if (stmt->query) {
efree(stmt->query);
}
@@ -1069,6 +1072,10 @@ PHP_FUNCTION(mysqli_stmt_construct)
efree(stmt);
RETURN_FALSE;
}
#ifndef MYSQLI_USE_MYSQLND
stmt->link_handle = Z_OBJ_HANDLE(*mysql_link);
zend_objects_store_add_ref_by_handle(stmt->link_handle TSRMLS_CC);
#endif
mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
mysqli_resource->ptr = (void *)stmt;
+8
View File
@@ -1869,6 +1869,10 @@ PHP_FUNCTION(mysqli_prepare)
efree(stmt);
RETURN_FALSE;
}
#ifndef MYSQLI_USE_MYSQLND
stmt->link_handle = Z_OBJ_HANDLE(*mysql_link);
zend_objects_store_add_ref_by_handle(stmt->link_handle TSRMLS_CC);
#endif
mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
mysqli_resource->ptr = (void *)stmt;
@@ -2413,6 +2417,10 @@ PHP_FUNCTION(mysqli_stmt_init)
efree(stmt);
RETURN_FALSE;
}
#ifndef MYSQLI_USE_MYSQLND
stmt->link_handle = Z_OBJ_HANDLE(*mysql_link);
zend_objects_store_add_ref_by_handle(stmt->link_handle TSRMLS_CC);
#endif
mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
mysqli_resource->status = MYSQLI_STATUS_INITIALIZED;
+4
View File
@@ -116,6 +116,10 @@ typedef struct {
BIND_BUFFER param;
BIND_BUFFER result;
char *query;
#ifndef MYSQLI_USE_MYSQLND
/* used to manage refcount with libmysql (already implement in mysqlnd) */
zend_object_handle link_handle;
#endif
} MY_STMT;
typedef struct {
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Bug #66762 mysqli@libmysql segfault in mysqli_stmt::bind_result() when link closed
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once("connect.inc");
$mysqli = new mysqli($host, $user, $passwd, $db);
$read_stmt = $mysqli->prepare("SELECT 1");
var_dump($read_stmt->bind_result($data));
unset($mysqli);
var_dump($read_stmt->bind_result($data));
?>
done!
--EXPECT--
bool(true)
bool(true)
done!
@@ -0,0 +1,140 @@
--TEST--
mysqli_begin_transaction()
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
require_once("connect.inc");
/* {{{ proto bool mysqli_begin_transaction(object link, [int flags [, string name]]) */
$tmp = NULL;
$link = NULL;
if (!is_null($tmp = @mysqli_begin_transaction()))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
if (!is_null($tmp = @mysqli_begin_transaction($link)))
printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
if (!is_null($tmp = @mysqli_begin_transaction($link, $link)))
printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
if (!is_null($tmp = @mysqli_begin_transaction($link, $link)))
printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
if (!is_null($tmp = @mysqli_begin_transaction($link, 0, $link)))
printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
if (!is_null($tmp = @mysqli_begin_transaction($link, 0, "mytrx", $link)))
printf("[007] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB'))
printf("[009] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
if (true !== ($tmp = mysqli_autocommit($link, true)))
printf("[010] Cannot turn on autocommit, expecting true, got %s/%s\n", gettype($tmp), $tmp);
/* overrule autocommit */
if (true !== ($tmp = mysqli_begin_transaction($link)))
printf("[011] Got %s - [%d] %s\n", var_dump($tmp, true), mysqli_errno($link), mysqli_error($link));
if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
$tmp = mysqli_rollback($link);
if ($tmp !== true)
printf("[013] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
/* empty */
$res = mysqli_query($link, "SELECT * FROM test");
var_dump($res->fetch_assoc());
/* valid flags */
$flags = array(
MYSQLI_TRANS_START_WITH_CONSISTENT_SNAPSHOT,
MYSQLI_TRANS_START_READ_WRITE,
MYSQLI_TRANS_START_READ_ONLY,
MYSQLI_TRANS_COR_AND_CHAIN,
MYSQLI_TRANS_COR_AND_NO_CHAIN,
MYSQLI_TRANS_COR_RELEASE,
MYSQLI_TRANS_COR_NO_RELEASE);
/* just coverage */
foreach ($flags as $flag) {
if (!mysqli_begin_transaction($link, $flag, sprintf("flag %d", $flag))) {
printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
if (!mysqli_query($link, 'SELECT * FROM test') ||
!mysqli_rollback($link)) {
printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
}
/* does it really set a flag? */
if (mysqli_get_server_version($link) >= 50600) {
if (!mysqli_begin_transaction($link, MYSQLI_TRANS_START_READ_ONLY, sprintf("flag %d", $flag))) {
printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
if (!mysqli_query($link, "INSERT INTO test(id) VALUES (2)") ||
!mysqli_commit($link)) {
printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
} else {
$res = mysqli_query($link, "SELECT id FROM test WHERE id = 2");
var_dump($res->fetch_assoc());
}
}
/* invalid flag */
do {
$invalid_flag = mt_rand(0, 10000);
} while (isset(array_flip($flags)[$invalid_flag]));
/* we may or may not hit an invalid combination provoking a SQL error */
if (!mysqli_begin_transaction($link, $invalid_flag, sprintf("flag %d", $invalid_flag))) {
printf("[018] invalid_flag = %d [%d] %s\n", $invalid_flag, mysqli_errno($link), mysqli_error($link));
} else {
printf("[018] invalid_flag = %d [%d] %s\n", $invalid_flag, mysqli_errno($link), mysqli_error($link));
}
if (!mysqli_begin_transaction($link, -1)) {
printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
/* does it like stupid names? */
if (!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "*/trick me?\n\0"))
printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
/* does it like stupid names? */
if (!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "az09"))
printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
print "done!";
?>
--CLEAN--
<?php
require_once("clean_table.inc");
?>
--EXPECTF--
NULL
[017] [1792] %s
[018] invalid_flag = %d [%d]%A
Warning: mysqli_begin_transaction(): Invalid value for parameter flags (-1) in %s on line %d
[019] [%d]%A
[020] [%d]%A
done!
+3 -2
View File
@@ -1741,8 +1741,9 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
zval_dtor(*current_field);
ZVAL_STRINGL(*current_field, (char *) start, bit_area - start - 1, 0);
}
} else
ZVAL_STRINGL(*current_field, (char *)p, len, 0);
} else {
ZVAL_STRINGL(*current_field, (char *)p, len, 0);
}
p += len;
last_field_was_string = TRUE;
}
+2 -2
View File
@@ -870,7 +870,7 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
req->digest = req->md_alg = EVP_get_digestbyname(req->digest_name);
}
if (req->md_alg == NULL) {
req->md_alg = req->digest = EVP_md5();
req->md_alg = req->digest = EVP_sha1();
}
PHP_SSL_CONFIG_SYNTAX_CHECK(extensions_section);
@@ -5077,7 +5077,7 @@ PHP_FUNCTION(openssl_cipher_iv_length)
/* {{{ proto string openssl_dh_compute_key(string pub_key, resource dh_key)
Computes shared sicret for public value of remote DH key and local DH key */
Computes shared secret for public value of remote DH key and local DH key */
PHP_FUNCTION(openssl_dh_compute_key)
{
zval *key;
+27
View File
@@ -2848,6 +2848,28 @@ SPL_METHOD(SplFileObject, fwrite)
RETURN_LONG(php_stream_write(intern->u.file.stream, str, str_len));
} /* }}} */
SPL_METHOD(SplFileObject, fread)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
long length = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &length) == FAILURE) {
return;
}
if (length <= 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0");
RETURN_FALSE;
}
Z_STRVAL_P(return_value) = emalloc(length + 1);
Z_STRLEN_P(return_value) = php_stream_read(intern->u.file.stream, Z_STRVAL_P(return_value), length);
/* needed because recv/read/gzread doesnt put a null at the end*/
Z_STRVAL_P(return_value)[Z_STRLEN_P(return_value)] = 0;
Z_TYPE_P(return_value) = IS_STRING;
}
/* {{{ proto bool SplFileObject::fstat()
Stat() on a filehandle */
FileFunction(fstat)
@@ -2947,6 +2969,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fwrite, 0, 0, 1)
ZEND_ARG_INFO(0, length)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fread, 0, 0, 1)
ZEND_ARG_INFO(0, length)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_ftruncate, 0, 0, 1)
ZEND_ARG_INFO(0, size)
ZEND_END_ARG_INFO()
@@ -2974,6 +3000,7 @@ static const zend_function_entry spl_SplFileObject_functions[] = {
SPL_ME(SplFileObject, fgetss, arginfo_file_object_fgetss, ZEND_ACC_PUBLIC)
SPL_ME(SplFileObject, fscanf, arginfo_file_object_fscanf, ZEND_ACC_PUBLIC)
SPL_ME(SplFileObject, fwrite, arginfo_file_object_fwrite, ZEND_ACC_PUBLIC)
SPL_ME(SplFileObject, fread, arginfo_file_object_fread, ZEND_ACC_PUBLIC)
SPL_ME(SplFileObject, fstat, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC)
SPL_ME(SplFileObject, ftruncate, arginfo_file_object_ftruncate, ZEND_ACC_PUBLIC)
SPL_ME(SplFileObject, current, arginfo_splfileinfo_void, ZEND_ACC_PUBLIC)
+28
View File
@@ -0,0 +1,28 @@
--TEST--
SplFileObject::fread function
--FILE--
<?php
$obj = new SplFileObject(__FILE__, 'r');
$data = $obj->fread(5);
var_dump($data);
$data = $obj->fread();
var_dump($data);
$data = $obj->fread(0);
var_dump($data);
// read more data than is available
$data = $obj->fread(filesize(__FILE__) + 32);
var_dump(strlen($data) === filesize(__FILE__) - 5);
?>
--EXPECTF--
string(5) "<?php"
Warning: SplFileObject::fread() expects exactly 1 parameter, 0 given in %s on line %d
NULL
Warning: SplFileObject::fread(): Length parameter must be greater than 0 in %s on line %d
bool(false)
bool(true)
@@ -1,18 +0,0 @@
--- sqlite3.c.orig 2011-04-17 10:54:01.000000000 -0700
+++ sqlite3.c 2011-05-12 22:57:02.000000000 -0700
@@ -1,3 +1,7 @@
+#if defined(_MSC_VER) && _MSC_VER < 1300
+#pragma optimize("", off)
+#endif
+
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
** version 3.7.6.2. By combining all the individual C code files into this
@@ -125956,3 +125960,7 @@
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
/************** End of fts3_icu.c ********************************************/
+
+#if defined(_MSC_VER) && _MSC_VER < 1300
+#pragma optimize("", on)
+#endif
+35809 -18492
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+82 -15
View File
@@ -49,8 +49,10 @@ struct sqlite3_api_routines {
int (*busy_timeout)(sqlite3*,int ms);
int (*changes)(sqlite3*);
int (*close)(sqlite3*);
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
int eTextRep,const char*));
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
int eTextRep,const void*));
const void * (*column_blob)(sqlite3_stmt*,int iCol);
int (*column_bytes)(sqlite3_stmt*,int iCol);
int (*column_bytes16)(sqlite3_stmt*,int iCol);
@@ -75,10 +77,18 @@ struct sqlite3_api_routines {
void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
int (*complete)(const char*sql);
int (*complete16)(const void*sql);
int (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
int (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
int (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
int (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
int (*create_collation)(sqlite3*,const char*,int,void*,
int(*)(void*,int,const void*,int,const void*));
int (*create_collation16)(sqlite3*,const void*,int,void*,
int(*)(void*,int,const void*,int,const void*));
int (*create_function)(sqlite3*,const char*,int,int,void*,
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
void (*xFinal)(sqlite3_context*));
int (*create_function16)(sqlite3*,const void*,int,int,void*,
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
void (*xFinal)(sqlite3_context*));
int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
int (*data_count)(sqlite3_stmt*pStmt);
sqlite3 * (*db_handle)(sqlite3_stmt*);
@@ -123,16 +133,19 @@ struct sqlite3_api_routines {
void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
void (*result_value)(sqlite3_context*,sqlite3_value*);
void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
const char*,const char*),void*);
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
char * (*snprintf)(int,char*,const char*,...);
int (*step)(sqlite3_stmt*);
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
char const**,char const**,int*,int*,int*);
void (*thread_cleanup)(void);
int (*total_changes)(sqlite3*);
void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
sqlite_int64),void*);
void * (*user_data)(sqlite3_context*);
const void * (*value_blob)(sqlite3_value*);
int (*value_bytes)(sqlite3_value*);
@@ -154,15 +167,19 @@ struct sqlite3_api_routines {
int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
int (*clear_bindings)(sqlite3_stmt*);
/* Added by 3.4.1 */
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
void (*xDestroy)(void *));
/* Added by 3.5.0 */
int (*bind_zeroblob)(sqlite3_stmt*,int,int);
int (*blob_bytes)(sqlite3_blob*);
int (*blob_close)(sqlite3_blob*);
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
int,sqlite3_blob**);
int (*blob_read)(sqlite3_blob*,void*,int,int);
int (*blob_write)(sqlite3_blob*,const void*,int,int);
int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
int (*create_collation_v2)(sqlite3*,const char*,int,void*,
int(*)(void*,int,const void*,int,const void*),
void(*)(void*));
int (*file_control)(sqlite3*,const char*,int,void*);
sqlite3_int64 (*memory_highwater)(int);
sqlite3_int64 (*memory_used)(void);
@@ -198,7 +215,11 @@ struct sqlite3_api_routines {
int (*backup_step)(sqlite3_backup*,int);
const char *(*compileoption_get)(int);
int (*compileoption_used)(const char*);
int (*create_function_v2)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*),void(*xDestroy)(void*));
int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
void (*xFinal)(sqlite3_context*),
void(*xDestroy)(void*));
int (*db_config)(sqlite3*,int,...);
sqlite3_mutex *(*db_mutex)(sqlite3*);
int (*db_status)(sqlite3*,int,int*,int*,int);
@@ -212,6 +233,23 @@ struct sqlite3_api_routines {
int (*wal_autocheckpoint)(sqlite3*,int);
int (*wal_checkpoint)(sqlite3*,const char*);
void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
int (*vtab_config)(sqlite3*,int op,...);
int (*vtab_on_conflict)(sqlite3*);
/* Version 3.7.16 and later */
int (*close_v2)(sqlite3*);
const char *(*db_filename)(sqlite3*,const char*);
int (*db_readonly)(sqlite3*,const char*);
int (*db_release_memory)(sqlite3*);
const char *(*errstr)(int);
int (*stmt_busy)(sqlite3_stmt*);
int (*stmt_readonly)(sqlite3_stmt*);
int (*stricmp)(const char*,const char*);
int (*uri_boolean)(const char*,const char*,int);
sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
const char *(*uri_parameter)(const char*,const char*);
char *(*vsnprintf)(int,char*,const char*,va_list);
int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
};
/*
@@ -412,9 +450,38 @@ struct sqlite3_api_routines {
#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
#define sqlite3_wal_hook sqlite3_api->wal_hook
#define sqlite3_blob_reopen sqlite3_api->blob_reopen
#define sqlite3_vtab_config sqlite3_api->vtab_config
#define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict
/* Version 3.7.16 and later */
#define sqlite3_close_v2 sqlite3_api->close_v2
#define sqlite3_db_filename sqlite3_api->db_filename
#define sqlite3_db_readonly sqlite3_api->db_readonly
#define sqlite3_db_release_memory sqlite3_api->db_release_memory
#define sqlite3_errstr sqlite3_api->errstr
#define sqlite3_stmt_busy sqlite3_api->stmt_busy
#define sqlite3_stmt_readonly sqlite3_api->stmt_readonly
#define sqlite3_stricmp sqlite3_api->stricmp
#define sqlite3_uri_boolean sqlite3_api->uri_boolean
#define sqlite3_uri_int64 sqlite3_api->uri_int64
#define sqlite3_uri_parameter sqlite3_api->uri_parameter
#define sqlite3_uri_vsnprintf sqlite3_api->vsnprintf
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
#endif /* SQLITE_CORE */
#define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;
#define SQLITE_EXTENSION_INIT2(v) sqlite3_api = v;
#ifndef SQLITE_CORE
/* This case when the file really is being compiled as a loadable
** extension */
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
# define SQLITE_EXTENSION_INIT3 \
extern const sqlite3_api_routines *sqlite3_api;
#else
/* This case when the file is being statically linked into the
** application */
# define SQLITE_EXTENSION_INIT1 /*no-op*/
# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
# define SQLITE_EXTENSION_INIT3 /*no-op*/
#endif
#endif /* _SQLITE3EXT_H_ */
+2 -2
View File
@@ -1395,8 +1395,8 @@ static const entity_multicodepoint_row multi_cp_html5_02ACC[] = {
{ {0x0FE00, "varsupsetneqq", 13} },
};
static const entity_multicodepoint_row multi_cp_html5_02AFD[] = {
{ {01, NULL , 0} },
{ {0x0FE00, "varsupsetneqq", 13} },
{ {01, "parsl", 5} },
{ {0x020E5, "nparsl", 6} },
};
/* End of double code point tables }}} */
@@ -464,6 +464,7 @@ if (empty($multicp_rows))
ksort($multicp_rows);
foreach ($multicp_rows as &$v) { ksort($v); }
unset($v);
echo
"/* {{{ Start of double code point tables for $name */", "\n\n";
+1 -1
View File
@@ -286,7 +286,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
if (headers != NULL) {
spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s\n%s", php_getuid(TSRMLS_C), f, headers);
} else {
spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s\n", php_getuid(TSRMLS_C), f);
spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s", php_getuid(TSRMLS_C), f);
}
efree(f);
}
+31 -10
View File
@@ -112,8 +112,17 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent
zend_hash_get_current_data_ex(target_hash, (void **) &element, &pos) == SUCCESS;
zend_hash_move_forward_ex(target_hash, &pos)) {
convert_to_string_ex(element);
el_len = Z_STRLEN_PP(element);
if (Z_TYPE_PP(element) != IS_STRING) {
zval tmp;
MAKE_COPY_ZVAL(element, &tmp);
convert_to_string(&tmp);
el_len = Z_STRLEN(tmp);
zval_dtor(&tmp);
} else {
el_len = Z_STRLEN_PP(element);
}
if (el_len == 0) {
continue;
}
@@ -125,7 +134,7 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent
if (string_length == 0) {
continue;
}
sizeenv += string_length+1;
sizeenv += string_length;
break;
}
}
@@ -138,19 +147,26 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent
for (zend_hash_internal_pointer_reset_ex(target_hash, &pos);
zend_hash_get_current_data_ex(target_hash, (void **) &element, &pos) == SUCCESS;
zend_hash_move_forward_ex(target_hash, &pos)) {
zval tmp;
convert_to_string_ex(element);
el_len = Z_STRLEN_PP(element);
if (el_len == 0) {
continue;
if (Z_TYPE_PP(element) != IS_STRING) {
MAKE_COPY_ZVAL(element, &tmp);
convert_to_string(&tmp);
} else {
tmp = **element;
}
data = Z_STRVAL_PP(element);
el_len = Z_STRLEN(tmp);
if (el_len == 0) {
goto next_element;
}
data = Z_STRVAL(tmp);
switch (zend_hash_get_current_key_ex(target_hash, &string_key, &string_length, &num_key, 0, &pos)) {
case HASH_KEY_IS_STRING:
if (string_length == 0) {
continue;
goto next_element;
}
l = string_length + el_len + 1;
@@ -175,6 +191,11 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent
case HASH_KEY_NON_EXISTENT:
break;
}
next_element:
if (Z_TYPE_PP(element) != IS_STRING) {
zval_dtor(&tmp);
}
}
assert((uint)(p - env.envp) <= sizeenv);
+4 -7
View File
@@ -5590,14 +5590,13 @@ PHP_FUNCTION(substr_compare)
int s1_len, s2_len;
long offset, len=0;
zend_bool cs=0;
uint cmp_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssl|lb", &s1, &s1_len, &s2, &s2_len, &offset, &len, &cs) == FAILURE) {
RETURN_FALSE;
}
if (ZEND_NUM_ARGS() >= 4 && len <= 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The length must be greater than zero");
if (ZEND_NUM_ARGS() >= 4 && len < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The length must be greater than or equal to zero");
RETURN_FALSE;
}
@@ -5611,12 +5610,10 @@ PHP_FUNCTION(substr_compare)
RETURN_FALSE;
}
cmp_len = (uint) (len ? len : MAX(s2_len, (s1_len - offset)));
if (!cs) {
RETURN_LONG(zend_binary_strncmp(s1 + offset, (s1_len - offset), s2, s2_len, cmp_len));
RETURN_LONG(zend_binary_strncmp(s1 + offset, (s1_len - offset), s2, s2_len, (uint)len));
} else {
RETURN_LONG(zend_binary_strncasecmp_l(s1 + offset, (s1_len - offset), s2, s2_len, cmp_len));
RETURN_LONG(zend_binary_strncasecmp_l(s1 + offset, (s1_len - offset), s2, s2_len, (uint)len));
}
}
/* }}} */
+43
View File
@@ -0,0 +1,43 @@
--TEST--
Bug #66535: Extra newline if add_x_header and no additional headers are used
--INI--
sendmail_path=tee mailBasic.out >/dev/null
mail.add_x_header = On
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == "WIN")
die("skip Won't run on Windows");
?>
--FILE--
<?php
/* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
* Description: Send an email message
* Source code: ext/standard/mail.c
* Alias to functions:
*/
echo "*** Testing mail() : send email without additional headers ***\n";
// Initialise all required variables
$to = 'user@company.com';
$subject = 'Test Subject';
$message = 'A Message';
$outFile = "mailBasic.out";
@unlink($outFile);
var_dump( mail($to, $subject, $message) );
echo file_get_contents($outFile);
unlink($outFile);
?>
===DONE===
--EXPECTF--
*** Testing mail() : send email without additional headers ***
bool(true)
To: user@company.com
Subject: Test Subject
X-PHP-Originating-Script: %d:bug66535.php
A Message
===DONE===
+57
View File
@@ -0,0 +1,57 @@
--TEST--
Bug #60602 proc_open() modifies environment if it contains arrays
--FILE--
<?php
$descs = array(
0 => array('pipe', 'r'), // stdin
1 => array('pipe', 'w'), // stdout
2 => array('pipe', 'w'), // strerr
);
$environment = array('test' => array(1, 2, 3));
$cmd = (substr(PHP_OS, 0, 3) == 'WIN') ? 'dir' : 'ls';
$p = proc_open($cmd, $descs, $pipes, '.', $environment);
if (is_resource($p)) {
$data = '';
while (1) {
$w = $e = NULL;
$n = stream_select($pipes, $w, $e, 300);
if ($n === false) {
echo "no streams \n";
break;
} else if ($n === 0) {
echo "process timed out\n";
proc_terminate($p, 9);
break;
} else if ($n > 0) {
$line = fread($pipes[1], 8192);
if (strlen($line) == 0) {
/* EOF */
break;
}
$data .= $line;
}
}
var_dump(strlen($data));
$ret = proc_close($p);
var_dump($ret);
var_dump(is_array($environment['test']));
} else {
echo "no process\n";
}
?>
==DONE==
--EXPECTF--
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
int(%d)
int(0)
bool(true)
==DONE==
+2 -2
View File
@@ -2,10 +2,10 @@
Bug #33605 (substr_compare crashes)
--FILE--
<?php
$res = substr_compare("aa", "a", -99999999, 0, 0);
$res = substr_compare("aa", "a", -99999999, -1, 0);
var_dump($res);
?>
--EXPECTF--
Warning: substr_compare(): The length must be greater than zero in %s on line %d
Warning: substr_compare(): The length must be greater than or equal to zero in %s on line %d
bool(false)
@@ -46,7 +46,7 @@ echo "Done\n";
--EXPECT--
*** Testing get_html_translation_table() : basic functionality/HTML 5 ***
-- with table = HTML_ENTITIES, ENT_COMPAT --
int(1509)
int(1510)
Array
(
[Æ] => &AElig;
@@ -1108,6 +1108,7 @@ Array
[⋾] => &notnivb;
[⋽] => &notnivc;
[∦] => &nparallel;
[⫽⃥] => &nparsl
[∂̸] => &npart
[⨔] => &npolint;
[⊀] => &npr;
@@ -1196,6 +1197,7 @@ Array
[⌽] => &ovbar;
[¶] => &para;
[⫳] => &parsim;
[⫽] => &parsl;
[∂] => &part;
[п] => &pcy;
[%] => &percnt;
@@ -1500,7 +1502,6 @@ Array
[⦜] => &vangrt;
[ϰ] => &varkappa;
[⫌︀] => &varsupsetneqq
[⫽︀] => &varsupsetneqq
[⊲] => &vartriangleleft;
[в] => &vcy;
[⊢] => &vdash;
@@ -1561,9 +1562,9 @@ Array
[‌] => &zwnj;
)
-- with table = HTML_ENTITIES, ENT_QUOTES --
int(1510)
int(1511)
-- with table = HTML_ENTITIES, ENT_NOQUOTES --
int(1508)
int(1509)
-- with table = HTML_SPECIALCHARS, ENT_COMPAT --
int(4)
Array
@@ -1418,6 +1418,7 @@ foreach ($mpcent as $i) {
&topcir; U+02AF1
&nhpar; U+02AF2
&parsim; U+02AF3
&parsl; U+02AFD
&fflig; U+0FB00
&filig; U+0FB01
&fllig; U+0FB02
@@ -1620,4 +1621,4 @@ foreach ($mpcent as $i) {
&nsupseteqq; U+02AC6 U+00338
&vsubnE; U+02ACB U+0FE00
&varsupsetneqq; U+02ACC U+0FE00
&varsupsetneqq; U+02AFD U+0FE00
&parsl;︀ U+02AFD U+0FE00
@@ -10,9 +10,10 @@ var_dump(substr_compare("abcde", "bc", 1, 3));
var_dump(substr_compare("abcde", "cd", 1, 2));
var_dump(substr_compare("abcde", "abc", 5, 1));
var_dump(substr_compare("abcde", "abcdef", -10, 10));
var_dump(substr_compare("abcde", "abc", 0, 0));
var_dump(substr_compare("abcde", -1, 0, NULL, new stdClass));
echo "Test\n";
var_dump(substr_compare("abcde", "abc", 0, -1));
var_dump(substr_compare("abcde", "abc", -1, NULL, -5));
var_dump(substr_compare("abcde", -1, 0, "str", new stdClass));
@@ -28,13 +29,15 @@ int(-1)
Warning: substr_compare(): The start position cannot exceed initial string length in %s on line %d
bool(false)
int(-1)
int(0)
Warning: substr_compare() expects parameter 5 to be boolean, object given in %s on line %d
bool(false)
Test
Warning: substr_compare(): The length must be greater than zero in %s on line %d
Warning: substr_compare(): The length must be greater than or equal to zero in %s on line %d
bool(false)
int(0)
Warning: substr_compare() expects parameter 4 to be long, string given in %s on line %d
bool(false)
+2 -2
View File
@@ -266,8 +266,8 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
p = s;
} else {
/* memrchr is a GNU specific extension
Emulate for wide compatibility */
for(p = e; *p != ':' && p >= s; p--);
Emulate for wide compatability */
for(p = e; p >= s && *p != ':'; p--);
}
if (p >= s && *p == ':') {
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 5
#define PHP_RELEASE_VERSION 11
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "5.5.11-dev"
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "5.5.11"
#define PHP_VERSION_ID 50511
+1 -10
View File
@@ -178,15 +178,6 @@ Parse and execute
.IR file
.TP
.PD 0
.B \-\-global \fIname\fP
.TP
.PD 1
.B \-g \fIname\fP
Make variable
.IR name
global in script.
.TP
.PD 0
.B \-\-help
.TP
.PD 1
@@ -298,7 +289,7 @@ Specify the document root to be used by the built-in web server
Version number
.TP
.PD 0
.B \-\-stripped
.B \-\-strip
.TP
.PD 1
.B \-w
+2
View File
@@ -47,6 +47,7 @@ VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
VC_VERSIONS[1600] = 'MSVC10 (Visual C++ 2010)';
VC_VERSIONS[1700] = 'MSVC11 (Visual C++ 2012)';
VC_VERSIONS[1800] = 'MSVC12 (Visual C++ 2013)';
var VC_VERSIONS_SHORT = new Array();
VC_VERSIONS_SHORT[1200] = 'VC6';
@@ -56,6 +57,7 @@ VC_VERSIONS_SHORT[1400] = 'VC8';
VC_VERSIONS_SHORT[1500] = 'VC9';
VC_VERSIONS_SHORT[1600] = 'VC10';
VC_VERSIONS_SHORT[1700] = 'VC11';
VC_VERSIONS_SHORT[1800] = 'VC12';
if (PROGRAM_FILES == null) {
PROGRAM_FILES = "C:\\Program Files";
+3 -3
View File
@@ -2,14 +2,14 @@ bz2-1.0.6
cclient-2007f
freetype-2.4.10
icu-51.2
jpeglib-9
jpeglib-9a
libcurl-7.35.0
libiconv-1.14
libmcrypt-2.5.8
libmpir-2.6.0
libpng-1.5.14
libpng-1.5.18
libpq-9.2.2
libssh2-1.4.2
libssh2-1.4.3
libtidy-20090406
libxslt-1.1.27
libxml-2.9.1