Commit Graph

41637 Commits

Author SHA1 Message Date
Anatol Belski
6f84ac721b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix leak
2016-10-08 19:25:36 +02:00
Anatol Belski
3c5742ebd7 fix leak 2016-10-08 19:07:35 +02:00
Nikita Popov
159de7723e Merge branch 'PHP-5.6' into PHP-7.0 2016-10-08 01:06:02 +02:00
Nikita Popov
b061fa909d Fix bug #73192 2016-10-08 01:04:22 +02:00
Nikita Popov
bc3a0b82b8 Revert "Fixed test"
This reverts commit a10d03ac16.
2016-10-08 00:43:36 +02:00
Nikita Popov
1c468ee044 Revert "Added validation to parse_url() to prohibit restricted characters inside login/pass components based on RFC3986"
This reverts commit 085dfca02b.
2016-10-08 00:43:17 +02:00
Christoph M. Becker
825e0fd430 Document that ext/shmop deals with resources as of PHP 7.0.0
Second attempt
2016-10-07 16:35:37 +02:00
Anatol Belski
5b79e95f7b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #73037, second round
2016-10-05 15:03:38 +02:00
Anatol Belski
07546496b1 Fix bug #73037, second round 2016-10-05 14:54:06 +02:00
Stanislav Malyshev
d946d10293 Bug #73218: add mitigation for ICU int overflow 2016-10-04 22:40:43 -07:00
Stanislav Malyshev
56e19b7c75 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed test
  Added validation to parse_url() to prohibit restricted characters inside login/pass components based on RFC3986
  Apparently negative wordwrap is a thing and should work as length = 0.
2016-10-04 21:56:28 -07:00
Stanislav Malyshev
d3eb58332a Add more locale length checks, due to ICU bugs. 2016-10-04 21:28:40 -07:00
Ilia Alshanetsky
a10d03ac16 Fixed test 2016-10-04 21:20:38 -07:00
Ilia Alshanetsky
085dfca02b Added validation to parse_url() to prohibit restricted characters inside login/pass components based on RFC3986 2016-10-04 21:20:31 -07:00
Stanislav Malyshev
8ea01d5f19 Apparently negative wordwrap is a thing and should work as length = 0.
I'll leave it as is for now.
2016-10-03 19:17:42 -07:00
Stanislav Malyshev
631173aa5c Really fix bug #73017 2016-10-03 18:07:21 -07:00
Keith Smiley
31cbce341c soap #69137 - Fix SSL verify when using a proxy
Name verification was failing because the OpenSSL extension was picking
the proxy server's address when guessing which name to compare to the
SSL certificate. This scenario is already handled for stream wrappers
in http_fopen_wrapper.c. This patch applies the same fix to the SOAP
extension: when a proxy is used, set peer_name explicitly on the stream
context.
2016-10-03 14:02:34 -04:00
Stanislav Malyshev
ef801b9bf9 Fix bug #73208 - another missing length check 2016-10-03 00:12:14 -07:00
Stanislav Malyshev
40e7baab3c Fix bug #73190: memcpy negative parameter _bc_new_num_ex 2016-10-03 00:09:02 -07:00
Christoph M. Becker
12967bc346 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-30 23:54:18 +02:00
Christoph M. Becker
9acfb1a3a5 Fix #73213: Integer overflow in imageline() with antialiasing
We port the respective fixes <https://github.com/libgd/libgd/commit/eca37d620>
and <https://github.com/libgd/libgd/commit/837b7327> to our bundled libgd.
2016-09-30 23:38:13 +02:00
Derick Rethans
6ad288ee23 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-30 20:49:53 +01:00
Derick Rethans
c0219b323e Fixed tests due to changes in underlaying data 2016-09-30 20:49:44 +01:00
Derick Rethans
7deb32abc9 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-30 20:31:05 +01:00
Derick Rethans
91fd4bf000 Fixed parsing of AM/PM without all the expected dots in place 2016-09-30 20:21:48 +01:00
Christoph M. Becker
dd93712911 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-30 11:40:55 +02:00
Christoph M. Becker
e72165bb86 Fix #73203: passing additional_parameters causes mail to fail
We make sure that there's no unsigned underflow, which happened for `y==0`.
2016-09-30 11:38:09 +02:00
Joe Watkins
e60620b974 Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0 2016-09-30 07:22:50 +01:00
Joe Watkins
a8d031fbd8 fix user filter bug 2016-09-30 07:21:01 +01:00
Christoph M. Becker
81cbbb68af Merge branch 'pull-request/2128' into PHP-7.0 2016-09-29 14:39:39 +02:00
Stanislav Malyshev
29e2a204fb Fixed bug #73174 - heap overflow in php_pcre_replace_impl 2016-09-28 22:29:59 -07:00
Derick Rethans
83780a6cd2 Updated to version 2016.7 (2016g) 2016-09-28 23:30:27 +01:00
Derick Rethans
6a544f2d1e Updated to version 2016.7 (2016g) 2016-09-28 23:30:26 +01:00
Chris Kings-Lynne
48b5a1f9b9 Ignore potentially misleading dberr values
FreeTDS had a buggy behavior where it would pass invalid values:
https://sourceforge.net/p/freetds/bugs/59/

The fix for this issue -- bc22b2ef817fb5d102bd758111ff3634b39a1319 on their
repo -- was to always use SYBESMSG for dberr. This makes it so the existing
pdo_dblib code would work as is. But by ignoring the dberr value in this
function, it will behave correctly, even with older versions of FreeTDS.
2016-09-26 17:07:46 -04:00
Stanislav Malyshev
1c0e9126fb Fix bug #73150: missing NULL check in dom_document_save_html 2016-09-25 21:25:01 -07:00
Stanislav Malyshev
0e6fe3a4c9 Fix bug #73147: Use After Free in PHP7 unserialize() 2016-09-25 19:53:59 -07:00
Stanislav Malyshev
1b29e4488e Fix bug #73091 - Unserializing DateInterval object may lead to __toString invocation 2016-09-25 16:43:24 -07:00
Stanislav Malyshev
e1709b7e58 Fix bug #73082 2016-09-25 16:07:14 -07:00
Anatol Belski
4e7b5ca459 Add an include path for freetype which is relevant for cmake builds 2016-09-25 20:55:13 +02:00
Christoph M. Becker
fa9d41f66c Merge branch 'PHP-5.6' into PHP-7.0 2016-09-25 10:46:44 +02:00
Christoph M. Becker
c696bc8cfa Fix test_image_equals_file() wrt. palette images
The recently introduced test_image_equals_file() doesn't properly work for
palette images, because in this case only the palette indexes are compared,
what can lead to false positives and negatives as shown in the added test.

To fix that we convert palette images to truecolor, what is supposed to be
faster than calling imagecolorsforindex() for each pixel.

We furthermore rely on PHP's refcounting to free unused images; after all,
this is not C.
2016-09-25 10:34:03 +02:00
Christoph M. Becker
5c81298597 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-24 12:41:48 +02:00
Christoph M. Becker
8f5eda4bf6 Fix #73161: imagecreatefromgd2() may leak memory 2016-09-24 12:36:54 +02:00
Christoph M. Becker
61722743f4 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-24 11:31:54 +02:00
Christoph M. Becker
709731797c Fix #73159: imagegd2(): unrecognized formats may result in corrupted files
We must not apply the format correction twice for truecolor images.
2016-09-24 11:28:20 +02:00
Christoph M. Becker
0a4b72fa94 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-24 10:48:24 +02:00
Christoph M. Becker
c7936ead8f Fix #73155: imagegd2() writes wrong chunk sizes on boundaries 2016-09-24 10:33:49 +02:00
Christoph M. Becker
1da79a6c6e Fix #73157 (again): imagegd2() ignores 3rd param if 4 are given
Obviously, there was a bad merge.
2016-09-24 00:35:24 +02:00
Christoph M. Becker
456be3ec37 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-23 23:46:22 +02:00
Christoph M. Becker
c240978067 Fix #73157: imagegd2() ignores 3rd param if 4 are given
We must initialize `q` for *more* than three parameters, too.
2016-09-23 23:42:34 +02:00
Anatol Belski
4685297f05 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
2016-09-23 18:46:51 +02:00
Anatol Belski
075aa911ff Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
This reverts commit f9a699f6c3.
2016-09-23 18:45:03 +02:00
Anatol Belski
f9936000da Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  skip this test for now as it seems to have issues running dev server
  Fixed bug #73037 SoapServer reports Bad Request when gzipped
2016-09-23 18:10:07 +02:00
Anatol Belski
28887fe41b skip this test for now as it seems to have issues running dev server 2016-09-23 18:07:08 +02:00
Anatol Belski
f9a699f6c3 Fixed bug #73037 SoapServer reports Bad Request when gzipped
(cherry picked from commit 410c68788a)
2016-09-23 18:06:12 +02:00
Anatol Belski
410c68788a Fixed bug #73037 SoapServer reports Bad Request when gzipped 2016-09-23 16:02:50 +02:00
Christoph M. Becker
deda058751 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-23 12:29:37 +02:00
Christoph M. Becker
726c5999eb Rework FreeType related tests
Firstly, there is no fundamental difference between running the tests on
freetype before and after 2.4.10, so we re-join the respective test cases.

Secondly, there are some minor differences in the results depending on
architecture, freetype versions and config options, so we cater to that
by allowing small deviations from the expectations.
2016-09-23 12:00:41 +02:00
Anatol Belski
54d8053ac5 Fix bug #73121 Bundled PCRE doesn't compile because JIT isn't supported on s390 2016-09-23 01:52:42 +02:00
Nikita Popov
c38f88ddb0 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-22 12:48:38 +02:00
Márcio Almada
4397306b32 fix bug related to #865
In case USE_KEY flag is active, RegexIterator->accept() should keep it's
old behavior which is to accept keys mapping arrays.

This broke after PHP 5.5 but was not noticed due to lack of tests for USE_KEY.
2016-09-22 12:46:19 +02:00
Anatol Belski
579c8669c8 Fixed bug #73126 Cannot pass parameter 1 by reference 2016-09-22 11:49:35 +02:00
Adam Baratz
d334d319f0 Limit size of result set for test query
This result set can be very large, depending on the database. This change
ensures this test won't be slow.
2016-09-21 16:21:33 -04:00
Peter LeBrun
dfd6baee0c PHP bug 67130: nextRowset should work with unfetched rows 2016-09-21 14:27:23 -04:00
Adam Baratz
b29ad29b91 Move dtor before memory freed to avoid invalid read 2016-09-21 12:00:19 -04:00
Xinchen Hui
56e3ec93a9 Fixed skip 2016-09-21 17:20:02 +08:00
Stanislav Malyshev
33a8af0510 Fix bug #73073 - CachingIterator null dereference when convert to string 2016-09-20 22:59:12 -07:00
Christoph M. Becker
eeb9113b6c Skip failing FreeType tests for now 2016-09-20 12:16:16 +02:00
Christoph M. Becker
ba2d9e1ff1 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-20 01:25:08 +02:00
Christoph M. Becker
fc2cadca2d Merge branch 'pull-request/1845' into PHP-5.6 2016-09-20 01:05:57 +02:00
Julien Pauli
c4f3ea10e4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Do not wrap user exception in case of custom JSON serialization

Conflicts:
	ext/json/json.c
2016-09-19 16:11:17 +02:00
Julien Pauli
1ed4b13fb6 Do not wrap user exception in case of custom JSON serialization 2016-09-19 16:06:12 +02:00
Nikita Popov
01759c4346 Add test for bug #72489 2016-09-17 22:54:25 +02:00
Christoph M. Becker
48cf8dd9c3 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-16 23:43:18 +02:00
Christoph M. Becker
6682673070 Fix #73100: session_destroy null dereference in ps_files_path_create 2016-09-16 23:41:10 +02:00
Christoph M. Becker
c18263e0e0 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-16 11:41:42 +02:00
Christoph M. Becker
46df064261 Fix #73003: Integer Overflow in gdImageWebpCtx of gd_webp.c
We add the missing integer overflow check to avoid potential buffer overflows.
2016-09-16 11:37:18 +02:00
Remi Collet
3c117d4136 fix test (32bits) 2016-09-15 15:32:39 +02:00
Remi Collet
55237fe153 fix ZTS build 2016-09-15 13:27:20 +02:00
Christoph M. Becker
44968927d7 Add CURLE_SSL_PINNEDPUBKEYNOTMATCH
This error constant is returned on key mismatch when CURLOPT_PINNEDPUBLICKEY
is used. As the option had been introduced in PHP 7.0.7, it makes sense to
also add the related error constant to PHP 7.0+.

Cf. <https://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html>.
2016-09-15 12:20:19 +02:00
Christoph M. Becker
cf9e2fbbf6 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-15 00:50:49 +02:00
Christoph M. Becker
7bfb7b62b1 Fix and reactivate regression test for bug #50194
Apparently, different FreeType versions render the string differently, so
we have to cater to these slight differences. Unfortunately, the testing
framework doesn't yet offer a clean API for this, so we work around the
limitations by parsing and checking the output of test_image_equals_file().
2016-09-15 00:46:00 +02:00
Christoph M. Becker
7a923c3afe Merge branch 'PHP-5.6' into PHP-7.0 2016-09-14 20:02:05 +02:00
Christoph M. Becker
36df4f8419 Skip ext/gd/tests/bug50194.phpt for now
There are apparently issues with the font rendering with different freetype
version; I'll have a look at this issue ASAP.
2016-09-14 20:00:30 +02:00
Adam Baratz
f559fb7556 Skip test for early TDS versions 2016-09-14 11:06:54 -04:00
Christoph M. Becker
bc27ce98ee Merge branch 'PHP-5.6' into PHP-7.0 2016-09-14 15:50:09 +02:00
Christoph M. Becker
09eb6ed35e Fix #50194: imagettftext broken on transparent background w/o alphablending
We must not draw the background pixels of the character glyphs, what has
already been fixed in GD 2.0.26.
2016-09-14 15:47:32 +02:00
Adam Baratz
bcee34c649 Add special case for earlier versions of TDS 2016-09-13 17:01:51 -04:00
Adam Baratz
0de333bd62 Adjust error formatting so ext/pdo/tests/bug_43130.phpt passes with pdo_dblib 2016-09-13 16:43:33 -04:00
Adam Baratz
69eef8c361 Free error and message strings when cleaning up PDO instances that use pdo_dblib 2016-09-13 16:43:30 -04:00
Adam Baratz
efadcb0390 Add common suite 2016-09-13 16:43:25 -04:00
Adam Baratz
9fb94f03e7 Explicitly allow NULL values for dblib compatibility
MSSQL won't necessarily default columns to NULL, see:
https://msdn.microsoft.com/en-us/library/ms174979.aspx
2016-09-13 16:36:23 -04:00
Adam Baratz
69013f6b26 Add dblib-specific query 2016-09-13 16:36:23 -04:00
Adam Baratz
f0a12af65b Remove test cases don't test distinct behavior
These cases are also incompatible with pdo_dblib. Removing is easier.
2016-09-13 16:36:23 -04:00
Adam Baratz
91c49c4ab0 Handle SQLDECIMAL/SQLNUMERIC types, which are used by later TDS versions 2016-09-13 16:32:37 -04:00
Adam Baratz
9cdf2042bd Allow \PDO::setAttribute() to set pdo_dblib query timeouts 2016-09-13 16:13:26 -04:00
Jakub Zelenka
3a739c9f9f Merge branch 'PHP-5.6' into PHP-7.0 2016-09-13 18:19:20 +01:00
Jakub Zelenka
05baa92727 Fix bug #73072 (Invalid path SNI_server_certs causes segfault) 2016-09-13 18:15:34 +01:00
Anatol Belski
1382e88ac1 upgrade bundled sqlite to 3.14.2 2016-09-13 15:44:21 +02:00
Anatol Belski
5163925796 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  add test for bug #73068
2016-09-13 15:29:46 +02:00
Anatol Belski
248f8c3a91 add test for bug #73068 2016-09-13 15:28:28 +02:00
Anatol Belski
855b8e4f79 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix test portability
2016-09-13 12:02:05 +02:00
Anatol Belski
fc31d6fed4 fix test portability 2016-09-13 12:00:29 +02:00
Anatol Belski
c403b30291 pick up the safe alloc pieces from
19866fb76c
2016-09-13 11:50:18 +02:00
Stanislav Malyshev
07c6bdb85d Merge branch 'PHP-7.0.11' into PHP-7.0
* PHP-7.0.11: (22 commits)
  Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields
  I don't think 8cceb012a7 is needed
  Fix test
  Add check in fgetcsv in case sizeof(unit) != sizeof(size_t)
  Fix bug #73065: Out-Of-Bounds Read in php_wddx_push_element of wddx.c
  Fix bug #73035 (Out of bound when verify signature of tar phar in phar_parse_tarfile)
  Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction
  Fix bug #73029 - Missing type check when unserializing SplArray
  Fix bug #72860: wddx_deserialize use-after-free
  Fix bug #73007: add locale length check
  Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile
  sync NEWS
  Revert "Merge branch 'PHP-5.6' into PHP-7.0"
  Merge branch 'PHP-5.6' into PHP-7.0
  Merge branch 'PHP-5.6' into PHP-7.0
  Revert "Revert "Merge branch 'PHP-5.6' into PHP-7.0""
  fix version
  sync NEWS
  Fix bug #72957
  set versions
  ...
2016-09-12 21:09:30 -07:00
Stanislav Malyshev
28f80baf3c Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
33d0ef0fef Fix test 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
c4cca4c20e Fix bug #73065: Out-Of-Bounds Read in php_wddx_push_element of wddx.c 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
f5a9592ad8 Fix bug #73035 (Out of bound when verify signature of tar phar in phar_parse_tarfile) 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
6a7cc8ff85 Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
7381d4c00e Add check in fgetcsv in case sizeof(unit) != sizeof(size_t) 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
ecb7f58a06 Fix bug #73029 - Missing type check when unserializing SplArray 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
b88393f08a Fix bug #72860: wddx_deserialize use-after-free 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
65c8caafa8 Also fix overflow in wordwrap 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
6d55ba2656 Fix bug #73007: add locale length check 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
ba5ac0d360 Add more checks for int overflow 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
223266e4e4 Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
19866fb76c Fix various int size overflows.
Add function for detection of string zvals with length that does not fit
INT_MAX.
2016-09-12 21:04:23 -07:00
Stanislav Malyshev
c984661d39 Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields 2016-09-12 20:28:50 -07:00
Stanislav Malyshev
32e0b46997 I don't think 8cceb012a7 is needed 2016-09-12 20:15:22 -07:00
Stanislav Malyshev
fab33740c5 Fix test 2016-09-12 20:15:18 -07:00
Adam Baratz
2302eef5c9 Never quote values as raw binary data
This reverts a1a18fca6e which was intended to fix
bug #52885. That commit introduced a BC break which wasn't universally
desirable. The issue of quoting binary data (or NVARCHAR strings, or other
nonstandard types) will have to be addressed separately.
2016-09-12 17:32:50 -04:00
Anatol Belski
8cceb012a7 Add check in fgetcsv in case sizeof(unit) != sizeof(size_t)
(cherry picked from commit 99ac11222cb2a4e9aa6a865f908b28def349c049)

Conflicts:
	ext/standard/file.c
2016-09-12 18:59:38 +02:00
Stanislav Malyshev
9528ce7315 Fix bug #73065: Out-Of-Bounds Read in php_wddx_push_element of wddx.c
(cherry picked from commit bbaf784f8d213e201baf67e861f20b38c6e87d3b)

Conflicts:
	ext/wddx/wddx.c
2016-09-12 18:13:04 +02:00
Stanislav Malyshev
c5f34c9eca Fix bug #73035 (Out of bound when verify signature of tar phar in phar_parse_tarfile)
(cherry picked from commit 75ebf471ff46ec6e5ee279b3650c11d51ebaf9e3)
2016-09-12 17:54:32 +02:00
Stanislav Malyshev
27876d22ef Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction
(cherry picked from commit b6e1e5e0b3e6221c7b14fa10cba30f5c5e719e1b)

Conflicts:
	Zend/zend_objects_API.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
2016-09-12 17:53:44 +02:00
Stanislav Malyshev
022e75cba1 Fix bug #73029 - Missing type check when unserializing SplArray
(cherry picked from commit 6d16288150be33392a3249e417a0929881feb9a2)

Conflicts:
	ext/spl/spl_array.c
2016-09-12 17:42:23 +02:00
Stanislav Malyshev
060ab26cfe Fix bug #72860: wddx_deserialize use-after-free
(cherry picked from commit ee552853ff4d72f626102025133e2cd1575043ee)

Conflicts:
	ext/wddx/wddx.c
2016-09-12 17:33:32 +02:00
Stanislav Malyshev
92db16e456 Fix bug #73007: add locale length check
(cherry picked from commit 9e07089626f373d0e7b24b7aeb8b8459aae5f5f8)

Conflicts:
	ext/intl/msgformat/msgformat_format.c
2016-09-12 17:19:47 +02:00
Stanislav Malyshev
0bfb970f43 Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile
(cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2)
2016-09-12 17:04:19 +02:00
Christoph M. Becker
82fa85fd08 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-12 13:27:57 +02:00
Christoph M. Becker
0cbf634657 Skip regression test for issue that has not yet been released in libgd
<https://github.com/libgd/libgd/issues/177> has been assessed as enhancement,
so most likely it will be released with GD 2.3.
2016-09-12 13:21:34 +02:00
Christoph M. Becker
c2044e60f3 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-12 12:39:14 +02:00
Christoph M. Becker
fcdc30b347 Skip test for external GD because of not yet published bugfix 2016-09-12 12:34:11 +02:00
Christoph M. Becker
c02cfd4e25 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-11 23:51:32 +02:00
Christoph M. Becker
6d0e773292 Skip tests for unpatched external libgd regarding libvpx
Some issues have never been fixed in the external libgd's libvpx binding,
so we skip the respective tests.
2016-09-11 23:49:09 +02:00
Andrea Faulds
d690014bf3 Remove zpp fallback code (always use Fast ZPP)
Squashed commit of the following:

commit 3e27fbb3d2
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Sep 11 19:14:37 2016 +0100

    Keep dummy FAST_ZPP macro for compatibility

commit 8a7cfd00de
Author: Andrea Faulds <ajf@ajf.me>
Date:   Mon Sep 5 22:36:03 2016 +0100

    Remove FAST_ZPP macro and plain zpp fallback code
2016-09-11 22:44:46 +01:00
Christoph M. Becker
529811cfb0 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-11 19:32:54 +02:00
Christoph M. Becker
6ef987e012 Split test for bundled vs. external libgd
The behavior of imagecropauto($im, IMG_CROP_DEFAULT) is rather different
for the bundled and an external libgd, see
<https://github.com/libgd/libgd/issues/298>.
Therefore we split the test for now.
2016-09-11 19:30:55 +02:00
Christoph M. Becker
225478bccf Merge branch 'PHP-5.6' into PHP-7.0 2016-09-11 18:35:11 +02:00
Christoph M. Becker
38455293f7 Make test case more resilient
This test case fails with external libgd, because libgd < 2.2.4 converts
palette images to truecolor (<https://github.com/libgd/libgd/issues/297>).

However, even if there happens no truecolor conversion, it is not guaranteed
that the palette indexes of the original and the cropped image are identical
(this is, for instance, not the case with current libgd master where the bug
has been fixed). Therefore we check for the expected RGBA value instead of
the palette index.
2016-09-11 18:29:27 +02:00
Christoph M. Becker
cd16b64f01 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-11 13:26:30 +02:00
Anatol Belski
65bf5e88c7 Revert "Merge branch 'PHP-5.6' into PHP-7.0"
This reverts commit 946335ba70, reversing
changes made to 3437dbfa00.
2016-09-11 12:59:43 +02:00
Christoph M. Becker
2970630133 Merge branch 'PHP-5.6' into PHP-7.0
(cherry picked from commit f93fd8ce32)
2016-09-11 12:59:43 +02:00
Christoph M. Becker
874697e30a Merge branch 'PHP-5.6' into PHP-7.0
(cherry picked from commit 8f32d609c5)
2016-09-11 12:59:43 +02:00
Anatol Belski
d947d974d5 Revert "Revert "Merge branch 'PHP-5.6' into PHP-7.0""
This reverts commit 62d5bfb527.
2016-09-11 12:59:43 +02:00
Christoph M. Becker
dc09f30933 A picture is worth a thousand message digests
The bundled GD test suites makes heavy use of md5() to verify the result
of drawing operations. This leads to fragile tests (even a slight change
in a PNG header would cause failure, and of course there is the
possibility of collisions), and even worse, eventual test failures are
rather unrevealing.

Therefore we replace all md5() verification with a simplistic
test_image_equals_file(), which is basically a simplified port of libgd's
gdTestImageCompareToFile(), adapted to the needs of PHPTs.

In the long run better tests helpers should be introduced (see also
<http://news.php.net/php.internals/94081>), but for now this solution
is preferable over the former.

(cherry picked from commit 24f9e96792)
2016-09-11 12:56:53 +02:00
Christoph M. Becker
8753356eb0 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-11 00:09:23 +02:00
Christoph M. Becker
326a4e38fb Add regression test for bug #73053
The test succeeds with libxml < 2.9.4, and is supposed to succeed with
libxml > 2.9.4. Unfortunately, we can't conditionally mark a test case
as XFAIL, so we're simply skipping the test for libxml 2.9.4 instead.
2016-09-11 00:06:45 +02:00
Anatol Belski
e539ea439b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Bug #73058 crypt broken when salt is 'too' long
2016-09-10 02:44:21 +02:00
Anatol Belski
669fda00b7 Bug #73058 crypt broken when salt is 'too' long 2016-09-10 02:39:28 +02:00
Nikita Popov
e3c08de08a Don't optimize (string) cast on arrays
Otherwise we throw a notice during pass1_5 optimization.
2016-09-09 16:38:26 +02:00
Christoph M. Becker
7a90fc96d8 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-09 16:30:26 +02:00
Christoph M. Becker
c42a7f2f3f Remove ignored --FAIL-- section from test case
This is just confusing.
2016-09-09 16:27:50 +02:00
Nikita Popov
bbcf77c309 Fix some block_pass bugs 2016-09-09 15:58:36 +02:00
Christoph M. Becker
1a30a7a422 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-09 14:34:11 +02:00
Christoph M. Becker
23e721fc93 Fix #73054: default option ignored when object passed to int filter
If an object that can't be converted to string is validated, we must not
bail out early, but rather check for a requested default value.
2016-09-09 14:30:24 +02:00
Levi Morrison
cb91a51b00 Partially fix bug #67167 - Wrong return value...
...from FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE

The remainer of the fix would require the filter functions to only
convert to string when it makes sense for that particular filter.

(cherry picked from commit 432dc527ad)
2016-09-09 12:45:46 +02:00
Yasuo Ohgaki
0e3b30fad1 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed Bug #68015 Session does not report invalid uid for files save handler
2016-09-09 11:32:20 +09:00
Yasuo Ohgaki
38553e853b Fixed Bug #68015 Session does not report invalid uid for files save handler 2016-09-09 11:31:54 +09:00
Yasuo Ohgaki
8c700076d7 Fix bug26639.phpt 2016-09-08 14:07:57 +09:00
Yasuo Ohgaki
379d9a1cfc Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix Bug #72992 mbstring.internal_encoding doesn't inherit default_charset
2016-09-08 13:32:31 +09:00
Yasuo Ohgaki
8bbd0952e5 Fix Bug #72992 mbstring.internal_encoding doesn't inherit default_charset 2016-09-08 13:17:10 +09:00
Yasuo Ohgaki
6f1a52bfbb Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed Bug #66964 mb_convert_variables() cannot detect recursion
2016-09-06 16:41:52 +09:00
Yasuo Ohgaki
a25f6f89cd Fixed Bug #66964 mb_convert_variables() cannot detect recursion 2016-09-06 16:05:34 +09:00
Christoph M. Becker
81ec843d0e Merge branch 'PHP-5.6' into PHP-7.0 2016-09-06 01:15:36 +02:00
Christoph M. Becker
8aad3131a1 Fix #70752: Depacking with wrong password leaves 0 length files
We should not open the output stream before we have tried to open the
archive entry, as failing the latter could leave an empty file behind.
2016-09-06 01:03:46 +02:00
Andrea Faulds
009ee6e503 Unbreak FAST_ZPP dead code 2016-09-05 22:12:26 +01:00
Keyur
0045d16863 Fixes #72590: Opcache restart with kill_all_lockers does not work
ACCEL_LOG_ERROR is special and causes a zend_bailout() and the code
never gets to call kill() in the next line after the logging. Change
the log level to WARNING.
2016-09-05 16:59:28 +02:00
Julien Pauli
e5047ac2d2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix #72972, Bad filter for the flags FILTER_FLAG_NO_RES_RANGE and FILTER_FLAG_NO_PRIV_RANGE
2016-09-05 10:12:49 +02:00
Julien Pauli
9834978a8b Fix #72972, Bad filter for the flags FILTER_FLAG_NO_RES_RANGE and FILTER_FLAG_NO_PRIV_RANGE 2016-09-05 10:08:42 +02:00
Stanislav Malyshev
92db92c620 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Implement #47456: Missing PCRE option 'J'
2016-09-05 00:38:57 -07:00
Christoph M. Becker
39423e425d Implement #47456: Missing PCRE option 'J'
While it is possible to force the same behavior by setting the internal
option (?J), having a dedicated modifier appears to be useful. After all,
J is even listed on the "Pattern Modifiers" man page[1], but the description
referrs to (?J).

[1] <http://php.net/manual/en/reference.pcre.pattern.modifiers.php>
2016-09-05 00:30:48 -07:00
Stanislav Malyshev
b5f9427ca9 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Recognize TDS versions 7.3 and 7.4
2016-09-05 00:29:18 -07:00
Stanislav Malyshev
cee363d609 Merge branch 'pull-request/2061' into PHP-5.6
* pull-request/2061:
  Recognize TDS versions 7.3 and 7.4
2016-09-05 00:29:11 -07:00
Stanislav Malyshev
54f6c8d6df Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Use integer placeholders, since values can vary with the TDS version
2016-09-05 00:19:26 -07:00
Adam Baratz
84d495055d Use integer placeholders, since values can vary with the TDS version 2016-09-05 00:17:59 -07:00
David Carlier
19350b6b73 phpdbg: couple of network function return checks. Possible
overflow when copy the socket_path configuration.
2016-09-04 23:18:51 -07:00
Stanislav Malyshev
a2fdf0f413 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Same issue as #72926 in another place.
2016-09-04 20:57:46 -07:00
Stanislav Malyshev
b578580e88 Same issue as #72926 in another place. 2016-09-04 20:49:34 -07:00
Stanislav Malyshev
c3dfe57c23 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Sync fix for bug #72910 with current upstream
2016-09-04 19:15:30 -07:00
Stanislav Malyshev
d1fbc98ff6 Sync fix for bug #72910 with current upstream 2016-09-04 19:13:48 -07:00
Christoph M. Becker
7f97d63130 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-04 16:39:45 +02:00
Christoph M. Becker
b7259b71b4 Fix #72994: mbc_to_code() out of bounds read
We're backporting commit 999a3553 to the still supported PHP 5.6.
2016-09-04 16:37:06 +02:00
Christoph M. Becker
8cc9570f53 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-03 19:59:44 +02:00
Christoph M. Becker
d582241368 Fix #67325: imagetruecolortopalette: white is duplicated in palette
gdImageTrueColorToPalette() is sometimes wasteful by putting multiple white
color entries into the palette. This is caused by an obvious typo, where
to avoid a division by zero when `total` is zero, `count` is checked instead
of `total`.

We fix this issue to improve the quality of the color quantization.

Cf. <https://github.com/libgd/libgd/commit/24b4550f>
2016-09-03 19:50:42 +02:00
Anatol Belski
c9040d43a8 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix leak and error check order
2016-09-03 17:03:55 +02:00
Anatol Belski
9513187dee fix leak and error check order 2016-09-03 16:59:17 +02:00
Christoph M. Becker
0bc7e0c0ce Merge branch 'PHP-5.6' into PHP-7.0 2016-09-03 13:46:03 +02:00
Christoph M. Becker
bca913d70a Fix proto comment
While we're at it, we also change a related comment to use American English
consistently.
2016-09-03 13:41:29 +02:00
Christoph M. Becker
f3dc00fdfb Merge branch 'PHP-5.6' into PHP-7.0 2016-09-03 00:30:05 +02:00
Christoph M. Becker
c83bdb8e6a Make test case more resilient
When ran from a root directory the test case failed, because the open_basedir
restriction for "../[…]" won't kick in. Therefore we change the current
working directory to the test case's directory, as discussed on internals,
see <http://news.php.net/php.internals/95585>.
2016-09-03 00:24:30 +02:00
Anatol Belski
7483acf511 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix double free
2016-09-03 00:05:02 +02:00
Anatol Belski
5efd2a33df fix double free 2016-09-03 00:01:04 +02:00
Julien Pauli
e14b14d026 Fix warning about sign-mismatch comparisons 2016-09-02 17:01:52 +02:00
Stanislav Malyshev
ccc8d92d3d Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #72910
  5.6.27 will be next
2016-09-01 23:28:44 -07:00
Stanislav Malyshev
e576714f6b Fix bug #72910
Merge upstream patch from 65bdf2a0d1
2016-09-01 23:27:06 -07:00
Xinchen Hui
1ee41683dc Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp() function) 2016-09-01 12:10:38 +08:00
Yasuo Ohgaki
cc797d4fc3 Fix bug #72940 properly. Reduce needless branches 2016-09-01 07:47:13 +09:00
Christoph M. Becker
f93fd8ce32 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-31 16:38:38 +02:00
Christoph M. Becker
b2d267d9ee Fix #71882 amendment 2: Negative ftruncate() on php://memory exhausts memory 2016-08-31 16:33:14 +02:00
Christoph M. Becker
8f32d609c5 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-31 14:53:53 +02:00
Christoph M. Becker
314a9f8553 Fix #71882 amendment: Negative ftruncate() on php://memory exhausts memory
To avoid BC breaks, we do not raise a warning for now.
2016-08-31 14:51:37 +02:00
Nikita Popov
3317287ce1 Fix bug #71711
Also handle another case of bug #71996.
2016-08-30 18:06:18 +02:00
Nikita Popov
8e487aefaa Fixed bug #71996 2016-08-30 17:20:55 +02:00
Christoph M. Becker
972302d2f0 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-30 15:01:12 +02:00
Christoph M. Becker
2f10db36af Fix #66797: mb_substr only takes 32-bit signed integer
`from` and `len` are `long`, but get passed to mbfl_substr() which expects
`int`s. Therefore we clamp the values to avoid the undefined conversion
behavior.
2016-08-30 14:52:47 +02:00
Nikita Popov
2c12a5f0a8 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-30 13:44:59 +02:00
Ville Hukkamäki
af7828a20f Test case for bug #72771 2016-08-30 13:44:34 +02:00
Nikita Popov
345b96c4a3 Fix bug #72957
(cherry picked from commit bfd4277008)
2016-08-30 13:38:54 +02:00
Nikita Popov
bfd4277008 Fix bug #72957 2016-08-30 13:05:53 +02:00
Nikita Popov
6adb7e0b7a Followup for bug #72971
Property writes did not respect the namespace either. This is an
incomplete fix in that it only handles the case where an existing
child element is modified, not when a new one is created.
2016-08-30 12:53:50 +02:00
Anatol Belski
62d5bfb527 Revert "Merge branch 'PHP-5.6' into PHP-7.0"
This reverts commit 65f0c163f9, reversing
changes made to 4b45c0a9a7.
2016-08-30 12:06:46 +02:00
Nikita Popov
07cc6a6ba2 Fix bug #72971 2016-08-30 10:54:31 +02:00
Yasuo Ohgaki
b5f2f6fbd8 Fixed bug #72940 SID always return "name=ID", even if session cookie exist 2016-08-30 15:58:25 +09:00
Christoph M. Becker
65f0c163f9 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-30 02:13:48 +02:00
Christoph M. Becker
207dab585a Fix #71882: Negative ftruncate() on php://memory exhausts memory
We must not pass negative sizes to a size_t parameter.
2016-08-30 02:05:45 +02:00
Christoph M. Becker
4b45c0a9a7 Merge branch 'pull-request/2043' into PHP-7.0 2016-08-30 01:16:45 +02:00
Anatol Belski
2004585d03 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  ensure null termination
2016-08-29 21:13:39 +02:00
Anatol Belski
d787b0ea13 ensure null termination 2016-08-29 21:03:03 +02:00
Anatol Belski
946335ba70 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #72703 Out of bounds global memory read in BF_crypt triggered by password_verify
2016-08-29 20:32:55 +02:00
Anatol Belski
295303b590 Fixed bug #72703 Out of bounds global memory read in BF_crypt triggered by password_verify 2016-08-29 20:25:34 +02:00
Anatol Belski
3437dbfa00 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix double free
2016-08-29 19:33:22 +02:00
Anatol Belski
1a840b9af0 fix double free 2016-08-29 19:27:47 +02:00
Anatol Belski
1d93086937 fix double free 2016-08-29 18:56:25 +02:00
Anatol Belski
ca4eeedd36 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix leak
2016-08-29 18:05:47 +02:00
Anatol Belski
e2609a38d9 fix leak 2016-08-29 18:01:21 +02:00
Anatol Belski
d80a317c0b fix leak 2016-08-29 15:43:10 +02:00
Anatol Belski
1d7ec685c1 fix possible memory leak 2016-08-29 15:28:09 +02:00
Dmitry Stogov
b66039db33 Fixed bug #72944 (Null pointer deref in zval_delref_p). 2016-08-29 12:02:50 +03:00
Christoph M. Becker
8fcfacf746 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-27 01:18:10 +02:00
Christoph M. Becker
2139918ea6 Fix #65550: get_browser() incorrectly parsers entries with "+" sign
+ signs in the browscap patterns are meant to be literal characters, so we
have to escape them for the regex matching.
2016-08-27 01:12:01 +02:00
Christoph M. Becker
c4c3eb55a7 Fix #72949: Typo in opcache error message 2016-08-26 18:50:30 +02:00
Alexander Zhuravlev
a000bff2c3 pdo_dblib: stringify uniqidentifier field
Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE

pdo_dblib: Stringify uniqidentifier field

Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE

Tests added.

pdo_dblib: Stringify uniqidentifier field

Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE

Tests fix.

pdo_dblib: Stringify uniqueidentifier field Added separate PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER attribute instead of PDO::ATTR_STRINGIFY_FETCHES.

pdo_dblib: Stringify uniqueidentifier field Added `getAttribute` support for PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER.

Simplify storage of stringify_uniqueidentifier attribute
2016-08-25 19:37:21 +02:00
Christoph M. Becker
433976f931 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-25 18:29:23 +02:00
Christoph M. Becker
84512a1177 Fix #70825: Cannot fetch multiple values with group in ini file
If we have the position already from the last fetch, we also have to preset
the current group, because it won't be read again.
2016-08-25 18:18:10 +02:00
Anatol Belski
51d19c12a5 fix check for args by ref 2016-08-25 18:06:47 +02:00
Christoph M. Becker
5f6a1d1472 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-25 16:22:57 +02:00
Christoph M. Becker
bd8112afe0 Fix #71514: Bad dba_replace condition because of wrong API usage
We're backporting commit 9e309a2d to PHP-5.6, because it is a bugfix.
2016-08-25 16:20:30 +02:00
Anatol Belski
392c5ea472 Fixed bug #72922 COM called from PHP does not return out parameters 2016-08-25 12:12:45 +02:00
Christoph M. Becker
4c13a7f5c4 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-21 19:48:38 +02:00
Christoph M. Becker
6a232c3604 Fix #68716: possible resource leaks in _php_image_convert()
We properly clean up after ourselves wrt. to closing opened file pointers
and created images.
2016-08-21 19:39:58 +02:00
Christoph M. Becker
4c68fc5392 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-21 17:45:49 +02:00
Christoph M. Becker
d65adac2be Fix #72913: imagecopy() loses single-color transparency on palette images
The proper code to handle true-color to palette copies is already contained
in gdImageCopy(), so we can simply remove the buggy duplicated code.
2016-08-21 17:39:23 +02:00
Christoph M. Becker
7a36056d6c Merge branch 'PHP-5.6' into PHP-7.0 2016-08-21 16:15:22 +02:00
Christoph M. Becker
9eb5bbd8bd Fix #66005: imagecopy does not support 1bit transparency on truecolor images
We must not copy transparent pixels, see
<https://github.com/libgd/libgd/commit/daac285c>.
2016-08-21 16:08:57 +02:00
Christoph M. Becker
39172d44d8 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-20 12:46:08 +02:00
Christoph M. Becker
52793c14d9 Improvements to fix #72714, suggested by nikic 2016-08-20 12:44:20 +02:00
Christoph M. Becker
078f674212 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-20 03:04:08 +02:00
Christoph M. Becker
e4a006cd3e Fix #65732: grapheme_*() is not Unicode compliant on CR LF sequence
According to the Unicode specification (at least as of 5.1), CRLF sequences
are considered to be a single grapheme. We cater to that special case by
letting grapheme_ascii_check() fail. While it would be trivial to fix
grapheme_ascii_check() wrt. grapheme_strlen(), grapheme_substr() and
grapheme_strrpos() would be much harder to handle, so we accept the slight
performance penalty if CRLF is involved.
2016-08-20 03:01:35 +02:00