]> granicus.if.org Git - php/log
php
5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 24 Jan 2020 11:51:02 +0000 (12:51 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Yet another check for php_strip_tags_ex()

5 years agoYet another check for php_strip_tags_ex()
Christoph M. Becker [Fri, 24 Jan 2020 11:45:04 +0000 (12:45 +0100)]
Yet another check for php_strip_tags_ex()

5 years agoDon't use CRLF when generating diffs
Nikita Popov [Fri, 24 Jan 2020 11:28:37 +0000 (12:28 +0100)]
Don't use CRLF when generating diffs

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 23 Jan 2020 14:09:54 +0000 (15:09 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug76348.phpt

5 years agoFix bug76348.phpt
Nikita Popov [Thu, 23 Jan 2020 14:08:20 +0000 (15:08 +0100)]
Fix bug76348.phpt

Adjust for URL change in XSD file and mark as online test.

Is it possible for use to store http://x-road.eu/xsd/xroad.xsd
locally instead? Do relative file system paths work here?
I'm not familiar with this.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 23 Jan 2020 13:58:01 +0000 (14:58 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #78902
  Add unit test for bug #78902

5 years agoFixed bug #78902
liudaixiao [Mon, 16 Dec 2019 01:10:28 +0000 (09:10 +0800)]
Fixed bug #78902

5 years agoAdd unit test for bug #78902
Léopold Jacquot [Wed, 4 Dec 2019 14:14:50 +0000 (15:14 +0100)]
Add unit test for bug #78902

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 23 Jan 2020 13:21:14 +0000 (14:21 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79151

5 years agoFixed bug #79151
Nikita Popov [Thu, 23 Jan 2020 13:19:20 +0000 (14:19 +0100)]
Fixed bug #79151

Make sure we also NULL out next/prev of the removed element on
pop/shift. This only matter is that element is still being referenced
by an iterator.

5 years agoFixed bug #79155
Nikita Popov [Thu, 23 Jan 2020 11:48:45 +0000 (12:48 +0100)]
Fixed bug #79155

Make sure we only unset the NULLABLE flag temporarily for class
resolution, as the same type may be compiled multiple types.

5 years agoEnable UBSan in addition to ASan
Christoph M. Becker [Tue, 31 Dec 2019 10:46:04 +0000 (11:46 +0100)]
Enable UBSan in addition to ASan

UBSan is a useful tool, so we enable it for `--enable-sanitizer` in
addition to ASan.

5 years agoMake MSVCRT memory leak checking usable for the test suite
Christoph M. Becker [Wed, 15 Jan 2020 22:04:03 +0000 (23:04 +0100)]
Make MSVCRT memory leak checking usable for the test suite

While basic support for MSVCRT debugging has been added long
ago[1], the leak checking is not usable for the test suite, because we
are no longer calling `xmlCleanupParser()` on RSHUTDOWN of
ext/libxml[2], and therefore a few bogus leaks are reported whenever
ext/libxml is unloaded.

We therefore ignore memory leaks for this case.  We introduce
`ZEND_IGNORE_LEAKS_BEGIN()` and `ZEND_IGNORE_LEAKS_END()` to keep
those ignores better readable, and also because these *might* be
useful for other leak checkers as well.

We also explicitly free the `zend_handlers_table` and the `p5s` to
avoid spurious leak reports.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d756e1db2324c1f4ab6f9b52e329959ce6a02bc3>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=8742276eb3905eb97a585417000c7b8df85006d4>

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Thu, 23 Jan 2020 07:06:28 +0000 (23:06 -0800)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  More checks for php_strip_tags_ex

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Thu, 23 Jan 2020 06:41:56 +0000 (22:41 -0800)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  More checks for php_strip_tags_ex

5 years agoMore checks for php_strip_tags_ex
Stanislav Malyshev [Thu, 23 Jan 2020 06:36:53 +0000 (22:36 -0800)]
More checks for php_strip_tags_ex

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 22 Jan 2020 10:15:55 +0000 (11:15 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Don't leak encoding_str

5 years agoDon't leak encoding_str
Christoph M. Becker [Wed, 22 Jan 2020 10:13:12 +0000 (11:13 +0100)]
Don't leak encoding_str

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 22 Jan 2020 09:30:25 +0000 (10:30 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79154: mb_convert_encoding() can modify $from_encoding

5 years agoFix #79154: mb_convert_encoding() can modify $from_encoding
Christoph M. Becker [Wed, 22 Jan 2020 09:25:37 +0000 (10:25 +0100)]
Fix #79154: mb_convert_encoding() can modify $from_encoding

We must not modify arrays passed by value.

5 years agoFix #79149: SEGV in mb_convert_encoding with non-string encodings
Christoph M. Becker [Wed, 22 Jan 2020 08:43:51 +0000 (09:43 +0100)]
Fix #79149: SEGV in mb_convert_encoding with non-string encodings

We must not assume that `hash_entry` `IS_STRING`, but rather use
`encoding_str` which is guaranteed to be.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Wed, 22 Jan 2020 08:17:56 +0000 (09:17 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  next will be 7.2.28

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Wed, 22 Jan 2020 08:17:33 +0000 (09:17 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  next will be 7.2.28

5 years agonext will be 7.2.28
Remi Collet [Wed, 22 Jan 2020 08:17:00 +0000 (09:17 +0100)]
next will be 7.2.28

5 years agoAvoid some @count() suppressions in run-tests.php
Nikita Popov [Tue, 21 Jan 2020 17:49:59 +0000 (18:49 +0100)]
Avoid some @count() suppressions in run-tests.php

5 years agoAdd sleep in FPM reload test
Nikita Popov [Tue, 21 Jan 2020 16:55:47 +0000 (17:55 +0100)]
Add sleep in FPM reload test

Explicitly mark the point where we have to wait.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 21 Jan 2020 15:19:04 +0000 (16:19 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79145: openssl memory leak

5 years agoFix #79145: openssl memory leak
Christoph M. Becker [Tue, 21 Jan 2020 15:17:25 +0000 (16:17 +0100)]
Fix #79145: openssl memory leak

We must increase the refcount of `return_value` only if `cert` is a
resource; this is already done in `php_openssl_evp_from_zval()`,
though.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 21 Jan 2020 10:53:36 +0000 (11:53 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79146: cscript can fail to run on some systems

5 years agoFix #79146: cscript can fail to run on some systems
Deus Kane [Mon, 20 Jan 2020 16:16:01 +0000 (16:16 +0000)]
Fix #79146: cscript can fail to run on some systems

In the buildconf and configure batch files, Windows' cscript utility was being
run without the /e:jscript flag. This works on systems that have not had the
default .js file association changed, but if .js has been re-associated to
(say) an IDE, the batch files fail with the error message:

Input Error: There is no script engine for file extension ".js".

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 21 Jan 2020 10:48:48 +0000 (11:48 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update NEWS wrt. sec fixes

5 years agoFix file clash in bug54446.phpt tests
Nikita Popov [Tue, 21 Jan 2020 10:38:49 +0000 (11:38 +0100)]
Fix file clash in bug54446.phpt tests

5 years agoUpdate NEWS wrt. sec fixes
Christoph M. Becker [Tue, 21 Jan 2020 10:31:14 +0000 (11:31 +0100)]
Update NEWS wrt. sec fixes

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Tue, 21 Jan 2020 06:47:01 +0000 (22:47 -0800)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update NEWS
  Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`)
  Fix #79099: OOB read in php_strip_tags_ex
  Fix #79091: heap use-after-free in session_create_id()

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Tue, 21 Jan 2020 06:22:02 +0000 (22:22 -0800)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Update NEWS
  Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`)
  Fix #79099: OOB read in php_strip_tags_ex
  Fix #79091: heap use-after-free in session_create_id()

5 years agoUpdate NEWS
Stanislav Malyshev [Tue, 21 Jan 2020 06:12:32 +0000 (22:12 -0800)]
Update NEWS

5 years agoFix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`)
Stanislav Malyshev [Tue, 21 Jan 2020 05:42:44 +0000 (21:42 -0800)]
Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`)

5 years agoFix #79099: OOB read in php_strip_tags_ex
Stanislav Malyshev [Tue, 21 Jan 2020 05:33:17 +0000 (21:33 -0800)]
Fix #79099: OOB read in php_strip_tags_ex

5 years agoFix #79091: heap use-after-free in session_create_id()
Christoph M. Becker [Mon, 20 Jan 2020 17:05:00 +0000 (18:05 +0100)]
Fix #79091: heap use-after-free in session_create_id()

If the `new_id` is released, we must not use it again.

5 years agoFix bug #79112: IMAP can't find OpenSSL during configure
Nikita Popov [Fri, 17 Jan 2020 10:22:32 +0000 (11:22 +0100)]
Fix bug #79112: IMAP can't find OpenSSL during configure

Remove the check of PHP_OPENSSL inside SETUP_OPENSSL. It's the
responsibility of the caller to determine whether they want to
enable openssl or not. This makes SSL detection in IMAP work,
which uses a different option.

Additionally also clarify that --with-openssl-dir cannot actually
be used to specify an OpenSSL directory -- these options just
serve as a way to enable OpenSSL in extensions without also
enabling the OpenSSL extension. They need to be renamed to
something clearer in master.

Closes GH-5091.

5 years agoIncrease timeout in mysqli_reap_async_query test
Nikita Popov [Mon, 20 Jan 2020 08:53:54 +0000 (09:53 +0100)]
Increase timeout in mysqli_reap_async_query test

The 2000 here is 2ms, which is a bit optimistic for parallelized
testing.

5 years agoLet's make this safer from maliciously crafted filename
Xinchen Hui [Mon, 20 Jan 2020 04:33:37 +0000 (12:33 +0800)]
Let's make this safer from maliciously crafted filename

5 years agominor cleanup
Xinchen Hui [Mon, 20 Jan 2020 04:28:57 +0000 (12:28 +0800)]
minor cleanup

5 years agoFixed bug #79114 (Eval class during preload causes class to be only half available)
Xinchen Hui [Mon, 20 Jan 2020 04:24:49 +0000 (12:24 +0800)]
Fixed bug #79114 (Eval class during preload causes class to be only half available)

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 17 Jan 2020 10:38:00 +0000 (11:38 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79115

5 years agoFixed bug #79115
Nikita Popov [Fri, 17 Jan 2020 10:37:35 +0000 (11:37 +0100)]
Fixed bug #79115

5 years agoUpdate php.ini files to add missing FTP extension
aand18 [Tue, 14 Jan 2020 14:15:26 +0000 (15:15 +0100)]
Update php.ini files to add missing FTP extension

FTP functionality isn't enabled by default and not listed as a disabled
extension in the `php.ini` file either.

This should spare a few googles to anyone needing FTP functionality in PHP.

Closes GH-5084.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 17 Jan 2020 08:48:42 +0000 (09:48 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #71876

5 years agoFixed bug #71876
Nikita Popov [Fri, 3 Jan 2020 10:14:45 +0000 (11:14 +0100)]
Fixed bug #71876

This is a backport of fcdc0a6db0ae63fbed9e3828137b899b844623ce
to the PHP-7.3 branch. We need to make sure that OnUpdateString
is also called for a NULL value, otherwise the reset of the encoding
at the end of the request will not work.

I believe I already tried to land this before once, but it didn't
actually end up on the PHP-7.3 branch due to a push conflict that
I only noticed just now.

5 years agoDisable optimizations for ASan instrumented builds
Christoph M. Becker [Fri, 27 Dec 2019 13:28:28 +0000 (14:28 +0100)]
Disable optimizations for ASan instrumented builds

ASan instrumentation does not support the MSVC debug runtime, but still
it does not make sense to enable optimizations for such builds, since
they are not meant for production usage anyway, and although memory
corruption issues are still found in optimized builds, the generated
diagnostics are close to being useless, and apparently sometimes even
outright wrong.  Therefore, we disable all optimizations for ASan
instrumented builds.

We also introduce and use `ZEND_WIN32_NEVER_INLINE` for ASan enabled
builds to avoid inlining of functions, so we get even better
diagnostics.

5 years agoFix #79096: FFI Struct Segfault
Christoph M. Becker [Sun, 12 Jan 2020 13:01:42 +0000 (14:01 +0100)]
Fix #79096: FFI Struct Segfault

We must not assume that the size of a function's return value is at
most `sizeof(ffi_arg)`, but rather have to use the size which already
has been determined for the return type if it is larger than
`sizeof(ffi_arg)`.

To be able to have a regression test, we export the required test
function from the zend-test extension, and make sure that the test
can be run on different platforms regardless of whether zend-tests was
built statically or dynamically.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 13 Jan 2020 12:22:43 +0000 (13:22 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH

5 years agoFix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
Christoph M. Becker [Mon, 13 Jan 2020 10:47:40 +0000 (11:47 +0100)]
Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH

Column names can be numeric strings, so we have to make sure to insert
the column values with the appropriate numeric keys, instead of adding
them.

5 years agoFix test
Nikita Popov [Mon, 13 Jan 2020 09:09:58 +0000 (10:09 +0100)]
Fix test

Hopefully (32-bit)

5 years agoBring back test case support for older MySQL versions
Christoph M. Becker [Sat, 11 Jan 2020 09:36:52 +0000 (10:36 +0100)]
Bring back test case support for older MySQL versions

These test cases have recently been adjusted to work with MySQL 8[1],
but some older, but still supported database versions, such as MySQL
5.6, still need the password to be sent hashed, so we fall back to
using `PASSWORD()`, if the `SET PASSWORD` query fails without it.

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

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 10 Jan 2020 19:01:28 +0000 (20:01 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix test cases which fail on Windows debug builds

5 years agoFix test cases which fail on Windows debug builds
Christoph M. Becker [Mon, 11 Nov 2019 11:14:05 +0000 (12:14 +0100)]
Fix test cases which fail on Windows debug builds

We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.

(cherry picked from commit 60081ca20d5701111de5f94ae64909b1cc265f1e)

5 years agoRemove unnecessary whitespace sensitivtiy from some tests
Nikita Popov [Fri, 10 Jan 2020 16:36:46 +0000 (17:36 +0100)]
Remove unnecessary whitespace sensitivtiy from some tests

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 10 Jan 2020 16:16:03 +0000 (06:16 +1400)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix test for Windows ZTS builds

5 years agoFix test for Windows ZTS builds
Christoph M. Becker [Fri, 10 Jan 2020 16:11:24 +0000 (06:11 +1400)]
Fix test for Windows ZTS builds

Cf. <https://bugs.php.net/bug.php?id=61685#1578672905>.

5 years agoSilence potential taskkill error messages
Christoph M. Becker [Thu, 9 Jan 2020 17:58:17 +0000 (18:58 +0100)]
Silence potential taskkill error messages

That test is still intermittently failing, because failure to kill the
child process is reported.  Therefore we silence these error messages.

5 years agoFix useless tests
Christoph M. Becker [Thu, 9 Jan 2020 14:19:56 +0000 (15:19 +0100)]
Fix useless tests

These tests are certainly not supposed to fail due to a typo in the
class names, but expect this failure.  We fix the typos and the
expectations.

5 years agoIncrease select timeout in FPM tester
Nikita Popov [Thu, 9 Jan 2020 09:19:02 +0000 (10:19 +0100)]
Increase select timeout in FPM tester

Let's see if that helps with the recent failure spree on Azure.

5 years agoFix #79086: Bump version not applied
Christoph M. Becker [Thu, 9 Jan 2020 08:19:52 +0000 (09:19 +0100)]
Fix #79086: Bump version not applied

We must not forget to update the version in configure.ac as well.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 8 Jan 2020 17:31:10 +0000 (18:31 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()

5 years agoFix #79078: Hypothetical use-after-free in curl_multi_add_handle()
Christoph M. Becker [Wed, 8 Jan 2020 10:52:24 +0000 (11:52 +0100)]
Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()

To avoid this, we have to verify the handlers already in
`curl_multi_add_handle()`, not only in `curl_multi_exec()`.

5 years agoBump version
Christoph M. Becker [Wed, 8 Jan 2020 17:26:14 +0000 (18:26 +0100)]
Bump version

5 years agoExtract function
Christoph M. Becker [Wed, 8 Jan 2020 15:54:31 +0000 (16:54 +0100)]
Extract function

As suggested by Nikita[1].

[1] <https://github.com/php/php-src/pull/5045#discussion_r364265013>

5 years agoRevert "Display a message if select in FPM test timeouts"
Nikita Popov [Wed, 8 Jan 2020 15:31:33 +0000 (16:31 +0100)]
Revert "Display a message if select in FPM test timeouts"

This reverts commit e2361498d519561e7eb5b73d138c1eaa80da2a20.

Ooops, this occurs normally during some tests, but I didn't notice
because I have slow tests disabled...

5 years agoDisplay a message if select in FPM test timeouts
Nikita Popov [Wed, 8 Jan 2020 14:56:37 +0000 (15:56 +0100)]
Display a message if select in FPM test timeouts

5 years agoMake test more resilient
Christoph M. Becker [Tue, 7 Jan 2020 14:28:48 +0000 (15:28 +0100)]
Make test more resilient

Depending on the libcurl version and perhaps configuration, it may show
additional info (due to `CURLOPT_VERBOSE` being activated), which we
have to ignore, to avoid spurious test failures.

5 years agoIncrease sleep() time in test case
Christoph M. Becker [Tue, 7 Jan 2020 13:24:55 +0000 (14:24 +0100)]
Increase sleep() time in test case

Apparently, the former increase to `sleep(2)` helped somewhat, but
still the test fails occassionally.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 7 Jan 2020 10:10:55 +0000 (11:10 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Bump version

5 years agoBump version
Christoph M. Becker [Tue, 7 Jan 2020 10:03:19 +0000 (11:03 +0100)]
Bump version

5 years agoRemove support for preloading on Windows
Nikita Popov [Tue, 10 Dec 2019 13:29:58 +0000 (14:29 +0100)]
Remove support for preloading on Windows

Due to ASLR restrictions, preloading on Windows does not work with
any code that has preloading dependencies on internal classes.
This effectively makes it unusable for any non-trivial codebase.

Instead of pretending like preloading is going to work, only to
make people realize that it really doesn't once they get beyond
a dummy example, we disable support for preloading on Windows
entirely.

Closes GH-4999.

5 years agoThrow Error when referencing uninit typed prop in __sleep
Nikita Popov [Fri, 3 Jan 2020 14:35:10 +0000 (15:35 +0100)]
Throw Error when referencing uninit typed prop in __sleep

Previously this generated a notice, but would likely generate an
Error when unserializing.

Now we treat it with the same distinction as direct property
accesses, i.e. referencing an unset/undefined normal property
stays a notice, while a typed property becomes an Error exception.

This fixed bug #79002.

Closes GH-5050.

5 years ago[ci skip] Merge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 6 Jan 2020 14:32:40 +0000 (15:32 +0100)]
[ci skip] Merge branch 'PHP-7.3' into PHP-7.4

Empty merge.

5 years agoRevert "Extend CURLFile to support streams"
Christoph M. Becker [Mon, 6 Jan 2020 14:19:34 +0000 (15:19 +0100)]
Revert "Extend CURLFile to support streams"

This reverts commit 17a9f1401aeb35fe1e3657b38102a410d151d42f, because
this commit would break ABI, and also due to bug #79013.
We keep the commit for PHP 7.4+, though.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 6 Jan 2020 13:48:22 +0000 (14:48 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #54298: Using empty additional_headers adding extraneous CRLF

5 years agoFix #54298: Using empty additional_headers adding extraneous CRLF
Christoph M. Becker [Sun, 5 Jan 2020 14:15:09 +0000 (15:15 +0100)]
Fix #54298: Using empty additional_headers adding extraneous CRLF

If the header string is empty, we pass `NULL` to `php_mail()` to avoid
further checks on the string length.

5 years agoDon't link against openssl 1.1 in curl
Nikita Popov [Mon, 6 Jan 2020 09:40:43 +0000 (10:40 +0100)]
Don't link against openssl 1.1 in curl

OpenSSL 1.1 does not need crypto locking callbacks, so avoid
detecting and linking against it in the first place.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 6 Jan 2020 09:38:08 +0000 (10:38 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79068: gdTransformAffineCopy() changes interpolation method

5 years agoFix #79068: gdTransformAffineCopy() changes interpolation method
Christoph M. Becker [Mon, 6 Jan 2020 09:33:47 +0000 (10:33 +0100)]
Fix #79068: gdTransformAffineCopy() changes interpolation method

We port
<https://github.com/libgd/libgd/commit/9088591eae437358ee5b929adf82865e37e3001e>.

5 years agoFix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH
Nikita Popov [Mon, 6 Jan 2020 09:29:41 +0000 (10:29 +0100)]
Fix bug #79063: Curl openssl does not respect PKG_CONFIG_PATH

5 years agoClean up curl openssl check
Nikita Popov [Mon, 6 Jan 2020 09:16:42 +0000 (10:16 +0100)]
Clean up curl openssl check

Only set HAVE_CURL_OPENSSL flag, and remove Windows specific code,
as all of this is only relevant for OpenSSL < 1.1, which is not
used on Windows.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 6 Jan 2020 08:36:49 +0000 (09:36 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79067: gdTransformAffineCopy() may use unitialized values

5 years agoFix #79067: gdTransformAffineCopy() may use unitialized values
Christoph M. Becker [Mon, 6 Jan 2020 08:35:13 +0000 (09:35 +0100)]
Fix #79067: gdTransformAffineCopy() may use unitialized values

We port
<https://github.com/libgd/libgd/commit/7a06c1669c563917bc48c464521e3de962ddb4e8>.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 3 Jan 2020 17:49:36 +0000 (18:49 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78808: [LMDB] MDB_MAP_FULL: Environment mapsize limit reached

5 years agoFix #78808: [LMDB] MDB_MAP_FULL: Environment mapsize limit reached
Christoph M. Becker [Thu, 14 Nov 2019 10:21:41 +0000 (11:21 +0100)]
Fix #78808: [LMDB] MDB_MAP_FULL: Environment mapsize limit reached

We implement support for a fifth parameter, which allows to specify the
mapsize.  The parameter defaults to zero, in which case the compiled in
default mapsize (usually 1048576) will be used.  The mapsize should be
a multiple of the page size of the OS.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 3 Jan 2020 17:12:41 +0000 (18:12 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78538: shmop memory leak

5 years agoFix #78538: shmop memory leak
Christoph M. Becker [Mon, 25 Nov 2019 13:05:15 +0000 (14:05 +0100)]
Fix #78538: shmop memory leak

If the descriptor's refcount drops to zero, we have to unmap the
respective file view, to avoid leaking memory.

5 years agoSlightly increase tolerance in time_sleep_until() test
Nikita Popov [Fri, 3 Jan 2020 15:48:06 +0000 (16:48 +0100)]
Slightly increase tolerance in time_sleep_until() test

With the 1ms tolerance this still occasionally fails on macos.
I love macos. It always works and causes no problems at all.

5 years agoTry to fix intermittently failing test case
Christoph M. Becker [Fri, 3 Jan 2020 15:44:53 +0000 (16:44 +0100)]
Try to fix intermittently failing test case

This test fails intermittently due to taskill reporting failure to kill
the process (because it already has been terminated).  We increase the
sleep time, to hopefully prevent that from happening again.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 3 Jan 2020 13:32:04 +0000 (14:32 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79015: undefined-behavior in php_date.c

5 years agoFix #79015: undefined-behavior in php_date.c
Christoph M. Becker [Mon, 23 Dec 2019 13:42:54 +0000 (14:42 +0100)]
Fix #79015: undefined-behavior in php_date.c

We check that the given microsecond fraction is in the valid range
[0, 1000000[, and otherwise mark it as invalid.  We also drop the
useless do loop; a plain block is sufficient here.

5 years agoRemove unnecessary strncpy in zip
Nikita Popov [Fri, 3 Jan 2020 10:51:46 +0000 (11:51 +0100)]
Remove unnecessary strncpy in zip

This causes a warning on GCC 9 and is unnecessary to boot: We
only use "cwd" for the open_basedir check, so we can just as well
pass in the original string.

5 years agoAdd test for bug #73816
Nikita Popov [Fri, 3 Jan 2020 10:26:31 +0000 (11:26 +0100)]
Add test for bug #73816

This has been fixed by 0f2cdbf214efd98b4bdaf5ca41728faf00e7c037,
add the test case.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 3 Jan 2020 10:16:14 +0000 (11:16 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #71876

5 years agoFixed bug #71876
Nikita Popov [Fri, 3 Jan 2020 10:14:45 +0000 (11:14 +0100)]
Fixed bug #71876

This is a backport of fcdc0a6db0ae63fbed9e3828137b899b844623ce
to the PHP-7.3 branch. We need to make sure that OnUpdateString
is also called for a NULL value, otherwise the reset of the encoding
at the end of the request will not work.

5 years agoFixed bug #79056
Nikita Popov [Fri, 3 Jan 2020 09:40:51 +0000 (10:40 +0100)]
Fixed bug #79056