]> granicus.if.org Git - php/log
php
5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 24 Jan 2020 13:55:00 +0000 (14:55 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79011
  Fix memory leaks in mysqlnd debug functionality

5 years agoFixed bug #79011
Nikita Popov [Fri, 24 Jan 2020 13:52:28 +0000 (14:52 +0100)]
Fixed bug #79011

auth_plugin_data_len here is 21, including the trailing null byte.
Directly use SCRAMBLE_LENGTH instead. Also add a sanity check that
the provided scramble is long enough.

5 years agoFix memory leaks in mysqlnd debug functionality
Nikita Popov [Fri, 24 Jan 2020 12:12:11 +0000 (13:12 +0100)]
Fix memory leaks in mysqlnd debug functionality

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 24 Jan 2020 13:20:59 +0000 (14:20 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Make test independent of online XSD schema
  Yet another check for php_strip_tags_ex()

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

* PHP-7.3:
  Make test independent of online XSD schema
  Yet another check for php_strip_tags_ex()

5 years agoMake test independent of online XSD schema
Christoph M. Becker [Fri, 24 Jan 2020 09:18:01 +0000 (10:18 +0100)]
Make test independent of online XSD schema

The test still needs to access <http://www.w3.org/2009/01/xml.xsd>, but
at least we no longer depend on <http://x-road.eu/xsd/x-road.xsd>,
which may be moved again.

5 years agoMerge branch 'PHP-7.4'
Remi Collet [Fri, 24 Jan 2020 13:06:38 +0000 (14:06 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add ZipArchive::CM_LZMA2 constant (since libzip 1.6.0)

5 years agoAdd ZipArchive::CM_LZMA2 constant (since libzip 1.6.0)
Remi Collet [Fri, 24 Jan 2020 13:06:19 +0000 (14:06 +0100)]
Add ZipArchive::CM_LZMA2 constant (since libzip 1.6.0)

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 24 Jan 2020 12:04:26 +0000 (13:04 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  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 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 agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 24 Jan 2020 11:28:54 +0000 (12:28 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Don't use CRLF when generating diffs

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 agoAlso use zend_memnrstr in mbfl_strpos
Nikita Popov [Fri, 24 Jan 2020 10:41:35 +0000 (11:41 +0100)]
Also use zend_memnrstr in mbfl_strpos

5 years agoBase mbfl_strpos on zend_memnstr
Nikita Popov [Fri, 24 Jan 2020 10:29:34 +0000 (11:29 +0100)]
Base mbfl_strpos on zend_memnstr

The same algorithm is also used by zend_memnstr, but it also has
a fast-path for short strings / needles, where a more naive
search performs better.

5 years agoExtract calculation of offset from pointer
Nikita Popov [Fri, 24 Jan 2020 10:15:58 +0000 (11:15 +0100)]
Extract calculation of offset from pointer

5 years agoHandle mb_str(r)ipos offset consistently as well
Nikita Popov [Fri, 24 Jan 2020 09:54:20 +0000 (10:54 +0100)]
Handle mb_str(r)ipos offset consistently as well

5 years agoMove offset error checking into mbfl_strpos
Nikita Popov [Fri, 24 Jan 2020 09:29:34 +0000 (10:29 +0100)]
Move offset error checking into mbfl_strpos

This avoids calculating the full length only in order to validate
the offset, as mbfl_strpos needs to find the offset internally
anyway.

5 years agoAdd #defines for mbfl_strpos error conditions
Nikita Popov [Fri, 24 Jan 2020 09:02:41 +0000 (10:02 +0100)]
Add #defines for mbfl_strpos error conditions

5 years agoAllow variadic arguments to replace non-variadic ones
Nikita Popov [Mon, 6 Jan 2020 11:06:51 +0000 (12:06 +0100)]
Allow variadic arguments to replace non-variadic ones

Any number of arguments can be replaced by a variadic one, so
long as the variadic argument is compatible (in the sense of
contravariance) with the subsumed arguments.

In particular this means that function(...$args) becomes a
near-universal signature: It is compatible with any function
signature that does not accept parameters by-reference.

This also fixes bug #70839, which describes a special case.

Closes GH-5059.

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

* PHP-7.4:
  Fix bug76348.phpt

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.4'
Nikita Popov [Thu, 23 Jan 2020 13:58:15 +0000 (14:58 +0100)]
Merge branch 'PHP-7.4'

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

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.4'
Nikita Popov [Thu, 23 Jan 2020 13:21:21 +0000 (14:21 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79151

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 agoApply custom format/length modifier removal to spprintf
George Peter Banyard [Thu, 23 Jan 2020 11:57:48 +0000 (12:57 +0100)]
Apply custom format/length modifier removal to spprintf

This mimicks the changes made to the custom snprintf implementation
by removing the custom 'v' format and custom 'I' length modifier
from the spprintf implementation.

Closes GH-5108

5 years agoRevert "Merge branch 'PHP-7.4'"
Christoph M. Becker [Thu, 23 Jan 2020 12:12:16 +0000 (13:12 +0100)]
Revert "Merge branch 'PHP-7.4'"

This reverts commit 046dcfb531e242d36a7af2942b9b148290c3c7fe, due to
segfaults on Travis.  This needs to be investigated.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 23 Jan 2020 11:55:28 +0000 (12:55 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79155

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 agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 23 Jan 2020 11:00:50 +0000 (12:00 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Enable UBSan in addition to ASan

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 agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 23 Jan 2020 10:48:20 +0000 (11:48 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Make MSVCRT memory leak checking usable for the test suite

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.4'
Stanislav Malyshev [Thu, 23 Jan 2020 07:06:35 +0000 (23:06 -0800)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  More checks for php_strip_tags_ex

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 agoAdd ValueError for invalid mode in count()
George Peter Banyard [Wed, 22 Jan 2020 00:55:12 +0000 (01:55 +0100)]
Add ValueError for invalid mode in count()

Closes GH-5106

5 years agoAdd UPGRADING notes [skip ci]
Máté Kocsis [Wed, 22 Jan 2020 22:24:28 +0000 (23:24 +0100)]
Add UPGRADING notes [skip ci]

5 years agoAdd ReflectionProperty::getDefaultValue and ReflectionProperty::hasDefaultValue
Benjamin Eberlei [Thu, 9 Jan 2020 21:51:15 +0000 (22:51 +0100)]
Add ReflectionProperty::getDefaultValue and ReflectionProperty::hasDefaultValue

5 years agoFix #78649 Provide ICU RELATIVE_ constants
Máté Kocsis [Tue, 21 Jan 2020 23:13:29 +0000 (00:13 +0100)]
Fix #78649 Provide ICU RELATIVE_ constants

Closes GH-5105

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

* PHP-7.4:
  Don't leak encoding_str

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.4'
Christoph M. Becker [Wed, 22 Jan 2020 09:32:06 +0000 (10:32 +0100)]
Merge branch 'PHP-7.4'

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

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 test expectation
Christoph M. Becker [Wed, 22 Jan 2020 09:21:55 +0000 (10:21 +0100)]
Fix test expectation

As of PHP 8.0.0, array to string conversion raises a warning.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 22 Jan 2020 08:45:37 +0000 (09:45 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79149: SEGV in mb_convert_encoding with non-string encodings

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.4'
Remi Collet [Wed, 22 Jan 2020 08:18:13 +0000 (09:18 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  next will be 7.2.28

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 agoUse smaller batch size in run-tests.php when appropriate
Tyson Andre [Mon, 20 Jan 2020 21:53:37 +0000 (16:53 -0500)]
Use smaller batch size in run-tests.php when appropriate

- When valgrind is used, communication overhead is relatively small,
  so just use a batch size of 1.
- If this is running a small enough number of tests,
  reduce the batch size to give batches to more workers.
  (Previously, if there were 90 tests and -j8,
  only 3 of 8 workers would get a batch of size 32 or less.
  After this change, the batch size is 12 or less)

Closes GH-5098

5 years agoDon't start unnecessary processes with run-tests.php -j
Tyson Andre [Mon, 20 Jan 2020 22:00:56 +0000 (17:00 -0500)]
Don't start unnecessary processes with run-tests.php -j

If there's only 2 files to test, then only start 2 workers instead of N.

If there's only 1 file, then avoid parallelism entirely.
A separate option such as `--force-parallel` could be added
if this turns out to be something developers would want to do
when debugging test failures.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 21 Jan 2020 17:50:14 +0000 (18:50 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Avoid some @count() suppressions in run-tests.php

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 agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 21 Jan 2020 16:56:43 +0000 (17:56 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add sleep in FPM reload test

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 agoPrefer using declaring class rather than direct parent in error
Nikita Popov [Tue, 21 Jan 2020 16:19:07 +0000 (17:19 +0100)]
Prefer using declaring class rather than direct parent in error

Point to the class that actually declares the property, which is
not necessarily the same as the direct parent class.

5 years agoSimplify __call fetching for static methods
Nikita Popov [Tue, 21 Jan 2020 16:04:24 +0000 (17:04 +0100)]
Simplify __call fetching for static methods

If we have a __call on a parent, we should always also have a
__call on the child, so there's no need to perform this walk.

5 years agoSimplify constant updating for properties
Nikita Popov [Tue, 21 Jan 2020 15:28:38 +0000 (16:28 +0100)]
Simplify constant updating for properties

Instead of walking up the parent chain, use the scope stored in
the property info. This way we only need to walk one list of
property infos.

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

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

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 agoSimplify ReflectionProperty::getDeclaringClass()
Nikita Popov [Tue, 21 Jan 2020 14:20:12 +0000 (15:20 +0100)]
Simplify ReflectionProperty::getDeclaringClass()

5 years agoDrop the custom 'v' format from snprintf custom implementation.
George Peter Banyard [Mon, 20 Jan 2020 22:17:24 +0000 (23:17 +0100)]
Drop the custom 'v' format from snprintf custom implementation.

Extensions should instead use the standard 's' format.

Closes GH-5100

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

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

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.4'
Christoph M. Becker [Tue, 21 Jan 2020 10:49:17 +0000 (11:49 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Update NEWS wrt. sec fixes

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 agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 21 Jan 2020 10:39:20 +0000 (11:39 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix file clash in bug54446.phpt tests

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 agoFix double free in array_reduce
Nikita Popov [Tue, 21 Jan 2020 10:26:24 +0000 (11:26 +0100)]
Fix double free in array_reduce

return_value needs to be explicitly nulled out in the failure case.

5 years agofix test: fgetss() no longer exists
Stanislav Malyshev [Tue, 21 Jan 2020 07:31:30 +0000 (23:31 -0800)]
fix test: fgetss() no longer exists

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

* PHP-7.4:
  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.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 agoDrop the custom I length modifier from snprintf custom implementation.
George Peter Banyard [Wed, 15 Jan 2020 16:06:02 +0000 (17:06 +0100)]
Drop the custom I length modifier from snprintf custom implementation.

Extensions should rather use the ZEND_LONG_FMT, ZEND_ULONG_FMT and
ZEND_XLONG_FMT macros defined in php-src/Zend/zend_long.h

Closes GH-5089

5 years agoSpeed up unserializing object properties
Tyson Andre [Sun, 19 Jan 2020 18:44:13 +0000 (13:44 -0500)]
Speed up unserializing object properties

Hash table lookups are slow.
Don't do one a second time to update the property.

The call to zend_hash_update_ind goes back to 8b0deb8cd2d

Background: Properties are IS_INDIRECT when they're a declared property,
and point to properties_table.
See https://nikic.github.io/2015/06/19/Internal-value-representation-in-PHP-7-part-2.html#objects-in-php-7

5 years agoRemove unnecessary result variable
Nikita Popov [Mon, 20 Jan 2020 10:05:34 +0000 (11:05 +0100)]
Remove unnecessary result variable

Instead directly use return_value. Hopefully this also works
around the "may be uninitialized" warning...

5 years agoEliminate uses of ZVAL_ZVAL and friends
Nikita Popov [Mon, 20 Jan 2020 09:34:17 +0000 (10:34 +0100)]
Eliminate uses of ZVAL_ZVAL and friends

Instead add RETURN_COPY(_VALUE) macros will the expected behavior.

RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck
around, probably because the alternative was to write directly to
the return_value variable.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 20 Jan 2020 08:59:40 +0000 (09:59 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #79112: IMAP can't find OpenSSL during configure

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 agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 20 Jan 2020 08:54:38 +0000 (09:54 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Increase timeout in mysqli_reap_async_query test

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 agoMerge branch 'PHP-7.4'
Xinchen Hui [Mon, 20 Jan 2020 04:35:08 +0000 (12:35 +0800)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Let's make this safer from maliciously crafted filename