Commit Graph

12548 Commits

Author SHA1 Message Date
Christoph M. Becker
9dddfbe755 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80185: jdtounix() fails after 2037
2020-10-07 13:25:11 +02:00
Christoph M. Becker
e857dfa7cc Fix #80185: jdtounix() fails after 2037
There is no such thing as the "end of the unix epoch", and if it was,
it would certainly not be 2037-10-11T02:00:00.  There is, however,
potential integer overflow which we need to avoid.

Closes GH-6288.
2020-10-07 13:23:50 +02:00
Nikita Popov
3b7c8bb973 Fix bug #80126
When performing an unlinked instanceof, we also need to consider
interfaces of parent classes, as they may not have been inherited
yet.
2020-10-06 16:33:14 +02:00
Christoph M. Becker
c6e7969f05 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #46050: odbc_next_result corrupts prepared resource
2020-10-05 17:47:35 +02:00
Christoph M. Becker
69ba81d183 Fix #46050: odbc_next_result corrupts prepared resource
When resetting the result's values, we also have to reset its numcols.
2020-10-05 17:46:37 +02:00
Matteo Beccati
7c48479f62 [ci skip] moved soap fix to 7.4.11
When committing I didn't notice that version had been just bumped
2020-10-02 09:33:50 +02:00
Matteo Beccati
1666cfcca0 [ci skip] moved soap fix to 7.3.23
When committing I didn't notice that version had been just bumped
2020-10-02 09:32:52 +02:00
Stanislav Malyshev
f20a2b4f3c [ci skip] Add 7.4.11 security fixes to NEWS 2020-09-29 10:13:38 -07:00
Stanislav Malyshev
ae95d06f68 [ci skip] Add 7.3.23 security fixes to NEWS 2020-09-29 10:09:33 -07:00
Christoph M. Becker
b87e43d931 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80152: odbc_execute() moves internal pointer of $params
2020-09-29 11:35:41 +02:00
Christoph M. Becker
bf5f07cc8b Fix #80152: odbc_execute() moves internal pointer of $params
As least intrusive fix, we separate the passed array argument.

Closes GH-6219.
2020-09-29 11:34:48 +02:00
Christoph M. Becker
e08f69194c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80150: Failure to fetch error message
2020-09-29 11:04:09 +02:00
Christoph M. Becker
df5efa2fcd Fix #80150: Failure to fetch error message
In case of statement related errors, we need to pass the respective
statement handle to `SQLError()`.

Closes GH-6217.
2020-09-29 11:02:51 +02:00
Christoph M. Becker
f1d8395c77 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #67465: NULL Pointer dereference in odbc_handle_preparer
2020-09-28 22:58:16 +02:00
Christoph M. Becker
6acfb79276 Fix #67465: NULL Pointer dereference in odbc_handle_preparer
We have to initialize `stmt->driver_data` before we use it.

Closes GH-6225.
2020-09-28 22:57:01 +02:00
Christoph M. Becker
1086e4ec88 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80147: BINARY strings may not be properly zero-terminated
2020-09-25 13:52:08 +02:00
Christoph M. Becker
a49555a9e1 Fix #80147: BINARY strings may not be properly zero-terminated
We have to manually ensure that all strings fetched from a data source
are zero-terminated.

Closes GH-6213.
2020-09-25 13:51:18 +02:00
Christoph M. Becker
901d022001 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78470: odbc_specialcolumns() no longer accepts $nullable
2020-09-24 12:16:54 +02:00
Christoph M. Becker
610e7d2c77 Fix #78470: odbc_specialcolumns() no longer accepts $nullable
It is mandatory to pass either `SQL_NO_NULLS` or `SQL_NULLABLE` as
tenth parameter to `SQLSpecialColumns()`; otherwise the function call
fails.  Therefore the user must be allowed to pass the desired value
as parameter to `odbc_specialcolumns()` again.

Closes GH-6200.
2020-09-24 12:15:59 +02:00
Christoph M. Becker
a89ac98f15 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #76735: Incorrect message in fopen on invalid mode
2020-09-23 10:54:59 +02:00
Christoph M. Becker
2576c57a51 Fix #76735: Incorrect message in fopen on invalid mode
We have to log errors in `stream_opener` callbacks to the wrapper's
error log, because otherwise we may pick up an unrelated `errno` or a
most generic message.

Closes GH-6187.
2020-09-23 10:54:06 +02:00
Christoph M. Becker
ff0f6c26c2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #76943: Inconsistent stream_wrapper_restore() errors
2020-09-22 16:12:37 +02:00
Christoph M. Becker
5ed0602ec6 Fix #76943: Inconsistent stream_wrapper_restore() errors
If restoring of any not registered built-in wrapper is requested, the
function is supposed to fail with a warning, so we have to check this
condition first.

Furthermore, to be able to detect whether a built-in wrapper has been
changed, it is not sufficient to check whether *any* userland wrapper
has been registered, but rather whether the specific wrapper has been
modified.

Closes GH-6183.
2020-09-22 16:11:35 +02:00
Christoph M. Becker
f445e9cb93 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79423: copy command is limited to size of file it can copy
2020-09-22 13:16:59 +02:00
Christoph M. Becker
4000780b3d Fix #79423: copy command is limited to size of file it can copy
Passing `NULL` as `lpFileSizeHigh` to `GetFileSize()` gives wrong
results for files larger than 0xFFFFFFFF bytes.  We fix this by using
`GetFileSizeEx()`, and let the mapping fail, if the file size is too
large for the architecture.

Closes GH-5319.
2020-09-22 13:15:07 +02:00
Christoph M. Becker
19c844594e Fix mmap copying
Instead of attempting to map large files into memory at once, we map
chunks of at most `PHP_STREAM_MMAP_MAX` bytes, and repeat that until we
hit the point where `php_stream_seek()` fails (see bug 54902), and copy
the rest of the file by reading and writing small chunks.

We also fix the mapping behavior for zero bytes on Windows, which did
not error (as with `mmap()`), but would have mapped the remaining file.
2020-09-21 16:07:57 +02:00
Christoph M. Becker
d27dc5c028 Fix #80118: Erroneous whitespace match with JIT only
We backport r1273[1] from PCRE2.

[1] <https://vcs.pcre.org/pcre2?revision=1273&view=revision>

Closes GH-6165.
2020-09-21 10:28:22 +02:00
Christoph M. Becker
105132bd6b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80114: parse_url does not accept URLs with port 0
2020-09-20 15:37:11 +02:00
Christoph M. Becker
81b2f3e5d9 Fix #80114: parse_url does not accept URLs with port 0
URIs with a 0 port are generally valid, so `parse_url()` should
recognize such URIs, but still report the port as missing.

Co-authored-by: twosee <twose@qq.com>

Closes GH-6152.
2020-09-20 15:34:45 +02:00
Nikita Popov
5e7c5a82a5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #80107: Handling of large compressed packets
  Bug #80107 Add test for mysqli_query() fails for ~16 MB long query when compression is enabled
2020-09-18 12:57:50 +02:00
Nikita Popov
ecd9c42f9e Fix bug #80107: Handling of large compressed packets
There's two layers of packet splitting going on. First, packets
need to be split into having a payload of exactly 2^24-1 bytes or
being the last packet. If the split packet has size between 2^24-5
and 2^24-1 bytes, the compressed packets also needs to be split,
though the choice of split doesn't matter here. I'm splitting off
the first 8192 bytes, as that's what I observe libmysqlclient to be
doing.
2020-09-18 12:55:44 +02:00
Christoph M. Becker
9f2d03952d Update to PCRE2 10.35
We also backport the fix for bug #79846, and add a test case for the
related bug #79363.
2020-09-17 14:07:05 +02:00
Christoph M. Becker
c3c76dbfb9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80115: mysqlnd.debug doesn't recognize absolute paths with slashes
2020-09-17 12:38:16 +02:00
Christoph M. Becker
efdbc3688b Fix #80115: mysqlnd.debug doesn't recognize absolute paths with slashes 2020-09-17 12:37:02 +02:00
Nikita Popov
9c136f10cd Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #80083
2020-09-17 10:13:53 +02:00
Nikita Popov
a4f806aa79 Fixed bug #80083
Add db2_execute() to the list of functions accessing the local
scope. Ideally the API wouldn't do that, but it seems most
pragmatic to address this on the opcache side at this point.
2020-09-17 10:12:10 +02:00
Christoph M. Becker
edddddcea8 7.3.24 is next 2020-09-15 10:51:41 +02:00
Derick Rethans
4e794b7935 The next release here will be 7.4.12 2020-09-15 09:36:57 +01:00
Christoph M. Becker
e41867888a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80067: Omitting the port in bindto setting errors
2020-09-11 14:46:51 +02:00
Christoph M. Becker
dfb3a79914 Fix #80067: Omitting the port in bindto setting errors
A recent commit[1] which fixed a memory leak introduced a regression
regarding the formerly liberal handling of IP addresses to bind to.  We
fix this by reverting that commit, and fix the memory leak where it
actually occurs.  In other words, this fix is less intrusive than the
former fix.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=0b8c83f5936581942715d14883cdebddc18bad30>

Closes GH-6104.
2020-09-11 14:44:12 +02:00
Sammy Kaye Powers
1b5268265c
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79825: opcache.file_cache causes SIGSEGV with custom opcode handlers
2020-09-09 12:36:51 -07:00
Sammy Kaye Powers
2d4aa1ef3d
Fix #79825: opcache.file_cache causes SIGSEGV with custom opcode handlers
Modules may have changed after restart which can cause dangling pointers from custom opcode handlers in the second-level cache files. This fix includes the installed module names and versions in the accel_system_id hash as entropy. Closes GH-5836
2020-09-09 12:08:19 -07:00
Christoph M. Becker
e6b2a97cac Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #72941: Modifying bucket->data by-ref has no effect any longer
2020-09-08 18:08:38 +02:00
Christoph M. Becker
5dcb8f2f1c Fix #72941: Modifying bucket->data by-ref has no effect any longer
To match the PHP 5 behavior, we have to explicitly cater to `buffer` or
`data` being references.

Closes GH-6096.
2020-09-08 18:06:40 +02:00
Nikita Popov
d0d9c3a980 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #80077
2020-09-08 10:01:13 +02:00
Nikita Popov
07cb665515 Fixed bug #80077
Quoting from the bug report:

> The domain names passed to getmxrr() do not contain a trailing dot.
> DNS lookups which do not find records will (depending on the local
> resolver config) try again by adding the local domain to the end of
> the searched host/domain. In many environments there's an mx record
> for any subdomain of the local domain and the MX query will return
> a hit. But the test expects no hit. So the test fails when checking
> that "qa.php.net" does not have an MX record in DNS. In our local
> environment the resolver falls back to also check qa.php.net.kippdata.de
> which does have an MX record. Using "qa.php.net." instead of "qa.php.net"
> should fix this for everyone.
2020-09-08 10:00:49 +02:00
Nikita Popov
2dabc4c305 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #80049
2020-09-03 17:12:58 +02:00
Nikita Popov
46a49be6c8 Fixed bug #80049
Type checking may convert to refcounted values, so force freeing
of extra args.
2020-09-03 17:12:40 +02:00
Christoph M. Becker
2f4a2a9316 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80048: Bug #69100 has not been fixed for Windows
2020-09-03 15:45:33 +02:00
Christoph M. Becker
1848ccdae2 Fix #80048: Bug #69100 has not been fixed for Windows
We fix the erroneous length calculation on Windows, too.

Closes GH-6067.
2020-09-03 15:43:19 +02:00