]> granicus.if.org Git - php/log
php
4 years agoTemporarily disable s390x job
Nikita Popov [Wed, 5 Aug 2020 17:58:44 +0000 (19:58 +0200)]
Temporarily disable s390x job

These aren't getting scheduled and just keep hogging jobs so
nothing else gets scheduled either.

4 years agoPrefer strtoll over atoll
Nikita Popov [Wed, 5 Aug 2020 16:36:27 +0000 (18:36 +0200)]
Prefer strtoll over atoll

Both are specified by C99, but strtoll has specified overflow
behavior while atoll does not, so prefer using it.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 5 Aug 2020 16:18:51 +0000 (18:18 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Check ps -p availability in process title test
  Add privilege check in pcntl_unshare test

4 years agoCheck ps -p availability in process title test
Nikita Popov [Wed, 5 Aug 2020 10:23:27 +0000 (12:23 +0200)]
Check ps -p availability in process title test

4 years agoAdd privilege check in pcntl_unshare test
Nikita Popov [Wed, 5 Aug 2020 07:53:22 +0000 (09:53 +0200)]
Add privilege check in pcntl_unshare test

Privileges for CLONE_NEWPID were not checked.

4 years agoOnly force log startup errors if display_startup_errors disabled
Nikita Popov [Wed, 5 Aug 2020 10:57:47 +0000 (12:57 +0200)]
Only force log startup errors if display_startup_errors disabled

Otherwise this results in duplicate errors.

Closes GH-5941.

4 years agoNormalize error message capitalization
Nikita Popov [Wed, 5 Aug 2020 14:44:06 +0000 (16:44 +0200)]
Normalize error message capitalization

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 5 Aug 2020 14:42:40 +0000 (16:42 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 5 Aug 2020 14:42:13 +0000 (16:42 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error

4 years agoFix memory leak on socket_sendmsg() / socket_recvmsg() error
Nikita Popov [Wed, 5 Aug 2020 08:55:41 +0000 (10:55 +0200)]
Fix memory leak on socket_sendmsg() / socket_recvmsg() error

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 5 Aug 2020 13:44:04 +0000 (15:44 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79930
  Fix iov_base pointer type for illumos
  Backport bless_tests.php changes from PHP 8

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 5 Aug 2020 13:43:49 +0000 (15:43 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79930

4 years agoFixed bug #79930
Nikita Popov [Wed, 5 Aug 2020 13:41:42 +0000 (15:41 +0200)]
Fixed bug #79930

We're inserting src_zval, so that's what we should addref.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 5 Aug 2020 13:18:03 +0000 (15:18 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix iov_base pointer type for illumos

4 years agoFix iov_base pointer type for illumos
David Carlier [Wed, 5 Aug 2020 09:09:18 +0000 (10:09 +0100)]
Fix iov_base pointer type for illumos

These systems has two versions of the iovec interface dependent on
compiler flags passed, the legacy version causing little build issue.

Closes GH-5939.

4 years agoBackport bless_tests.php changes from PHP 8
Nikita Popov [Wed, 5 Aug 2020 12:59:56 +0000 (14:59 +0200)]
Backport bless_tests.php changes from PHP 8

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 5 Aug 2020 12:59:06 +0000 (14:59 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Unset ai_canonname field in dump

4 years agoUnset ai_canonname field in dump
Nikita Popov [Wed, 5 Aug 2020 12:56:15 +0000 (14:56 +0200)]
Unset ai_canonname field in dump

Okay, looks like ai_canonname does not get set on macos even if
AI_CANONNAME is specified, so canonicalize this in the other
direction instead and unset ai_canonname if it is present.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 5 Aug 2020 10:12:24 +0000 (12:12 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Check ps -p availability in proc_nice test
  Set AI_CANONNAME flag in socket_addrinfo test
  Add ipv6 skipif to test
  Improve privilege check in pcntl_setpriority() test

4 years agoCheck ps -p availability in proc_nice test
Nikita Popov [Wed, 5 Aug 2020 09:15:49 +0000 (11:15 +0200)]
Check ps -p availability in proc_nice test

4 years agoSet AI_CANONNAME flag in socket_addrinfo test
Nikita Popov [Wed, 5 Aug 2020 09:11:17 +0000 (11:11 +0200)]
Set AI_CANONNAME flag in socket_addrinfo test

Musl always populates ai_canonname. Set the flag to avoid output
discrepancies.

4 years agoAdd ipv6 skipif to test
Nikita Popov [Wed, 5 Aug 2020 09:02:21 +0000 (11:02 +0200)]
Add ipv6 skipif to test

This was done for the -unix variant, but not the (formerly
windows-only?) main test.

4 years agoImprove privilege check in pcntl_setpriority() test
Nikita Popov [Wed, 5 Aug 2020 07:58:34 +0000 (09:58 +0200)]
Improve privilege check in pcntl_setpriority() test

We need CAP_SYS_NICE privileges, which might not be available
just because we're running as root (Docker...)

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 5 Aug 2020 08:42:08 +0000 (10:42 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Suppress warning in pcntl_unshare skipif
  Use standard types in fopencookie test
  Remove posix_kill() test
  Relax error message check
  Check whether setlocale -a is available

4 years agoSuppress warning in pcntl_unshare skipif
Nikita Popov [Tue, 4 Aug 2020 14:05:11 +0000 (16:05 +0200)]
Suppress warning in pcntl_unshare skipif

4 years agoUse standard types in fopencookie test
Nikita Popov [Tue, 4 Aug 2020 13:54:31 +0000 (15:54 +0200)]
Use standard types in fopencookie test

Instead of internal __size_t / __off64_t types use ssize_t and off64_t.
This makes it work on musl as well.

4 years agoRemove posix_kill() test
Nikita Popov [Tue, 4 Aug 2020 13:06:19 +0000 (15:06 +0200)]
Remove posix_kill() test

This test is doing something really dubious. There's a race
condition here that would kill some poor process that happens
to start at just the wrong time.

4 years agoRelax error message check
Nikita Popov [Tue, 4 Aug 2020 11:14:12 +0000 (13:14 +0200)]
Relax error message check

4 years agoCheck whether setlocale -a is available
Nikita Popov [Tue, 4 Aug 2020 11:02:52 +0000 (13:02 +0200)]
Check whether setlocale -a is available

4 years agoSuppress warning in pcntl_unshare skipif
Nikita Popov [Tue, 4 Aug 2020 14:05:11 +0000 (16:05 +0200)]
Suppress warning in pcntl_unshare skipif

4 years agoUse standard types in fopencookie test
Nikita Popov [Tue, 4 Aug 2020 13:54:31 +0000 (15:54 +0200)]
Use standard types in fopencookie test

Instead of internal __size_t / __off64_t types use ssize_t and off64_t.
This makes it work on musl as well.

4 years agoRemove posix_kill() test
Nikita Popov [Tue, 4 Aug 2020 13:06:19 +0000 (15:06 +0200)]
Remove posix_kill() test

This test is doing something really dubious. There's a race
condition here that would kill some poor process that happens
to start at just the wrong time.

4 years agoRelax error message check
Nikita Popov [Tue, 4 Aug 2020 11:14:12 +0000 (13:14 +0200)]
Relax error message check

4 years agoCheck whether setlocale -a is available
Nikita Popov [Tue, 4 Aug 2020 11:02:52 +0000 (13:02 +0200)]
Check whether setlocale -a is available

4 years agoUpdate NEWS for 8.0.0beta2
Gabriel Caruso [Tue, 4 Aug 2020 17:40:26 +0000 (17:40 +0000)]
Update NEWS for 8.0.0beta2

4 years agoUpdate API version numbers
Gabriel Caruso [Tue, 4 Aug 2020 07:58:33 +0000 (09:58 +0200)]
Update API version numbers

In preparation for PHP 8.0.

4 years agoRevert "Prepare for PHP 8.1"
Nikita Popov [Tue, 4 Aug 2020 20:24:26 +0000 (22:24 +0200)]
Revert "Prepare for PHP 8.1"

This reverts commit 1ab4d0e6b7abb67d5a01ce3327bf973772271fb2.
This reverts commit a359635cb1a4df8b5137a506c88c4cb102acac0e.

4 years agoFPM: Prevent warning with raising pm.max_children for shared pool
Jakub Zelenka [Tue, 4 Aug 2020 20:01:13 +0000 (21:01 +0100)]
FPM: Prevent warning with raising pm.max_children for shared pool

4 years agoPrepare for PHP 8.1
Gabriel Caruso [Tue, 4 Aug 2020 16:46:14 +0000 (18:46 +0200)]
Prepare for PHP 8.1

4 years agoUpdate API version numbers
Gabriel Caruso [Tue, 4 Aug 2020 07:58:33 +0000 (09:58 +0200)]
Update API version numbers

In preparation for PHP 8.0.

4 years agoRelax precision in atan test
Nikita Popov [Tue, 4 Aug 2020 11:17:51 +0000 (13:17 +0200)]
Relax precision in atan test

4 years agoRelax precision in hypot test
Nikita Popov [Tue, 4 Aug 2020 11:17:08 +0000 (13:17 +0200)]
Relax precision in hypot test

4 years agoAdd compatibility define for PHP_CHECK_GCC_ARG
Nikita Popov [Tue, 4 Aug 2020 14:11:58 +0000 (16:11 +0200)]
Add compatibility define for PHP_CHECK_GCC_ARG

This defines the m4 macro, but makes it always error.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Tue, 4 Aug 2020 10:34:54 +0000 (12:34 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  [ci skip] Fix 7.3.21 release date

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 4 Aug 2020 10:32:32 +0000 (12:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Fix 7.3.21 release date

4 years ago[ci skip] Fix 7.3.21 release date
Christoph M. Becker [Tue, 4 Aug 2020 10:31:08 +0000 (12:31 +0200)]
[ci skip] Fix 7.3.21 release date

4 years agoFix opcache JIT on NetBSD with PaX
David Carlier [Mon, 3 Aug 2020 19:49:58 +0000 (20:49 +0100)]
Fix opcache JIT on NetBSD with PaX

When PaX mprotect active, opcache JIT test fail as it needs
the PROT_MPROTECT macro to be able to allow further permission
promotion with mprotect.

Closes GH-5929.

4 years agoXFAIL status-listen FPM test
Nikita Popov [Tue, 4 Aug 2020 08:27:33 +0000 (10:27 +0200)]
XFAIL status-listen FPM test

Has frequent intermittent failures with:

ERROR: The NOTICE does not match expected message:
- PATTERN: /^\[\d\d-\w\w\w-\d{4} \d\d:\d\d:\d\d\] NOTICE: Terminating ...$/
- MESSAGE: [04-Aug-2020 08:15:37] WARNING: [pool unconfined_status] server reached max_children setting (2), consider raising it
- EXPECT: 'Terminating ...'
- ACTUAL: '2020 08:15:37] WARNING: [pool unconfined_status] server reached max_children setting (2), consider raising it'

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 4 Aug 2020 08:26:27 +0000 (10:26 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Manually build re2c on macos

4 years agoManually build re2c on macos
Nikita Popov [Tue, 4 Aug 2020 08:05:23 +0000 (10:05 +0200)]
Manually build re2c on macos

Avoid issues with the licensing mafia, see:
https://github.com/Homebrew/homebrew-core/pull/59094

Closes GH-5932.

4 years agoAdd opcache.jit=tracing|function values, make on/yes/true synonym for tracing.
Benjamin Eberlei [Fri, 31 Jul 2020 11:27:32 +0000 (13:27 +0200)]
Add opcache.jit=tracing|function values, make on/yes/true synonym for tracing.

4 years agoMerge branch 'PHP-7.4'
Remi Collet [Tue, 4 Aug 2020 07:56:07 +0000 (09:56 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  bump version to 7.2.34-dev
  Update NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 4 Aug 2020 07:55:50 +0000 (09:55 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  bump version to 7.2.34-dev
  Update NEWS

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 4 Aug 2020 07:55:40 +0000 (09:55 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  bump version to 7.2.34-dev
  Update NEWS

4 years agobump version to 7.2.34-dev
Remi Collet [Tue, 4 Aug 2020 07:50:07 +0000 (09:50 +0200)]
bump version to 7.2.34-dev

4 years agoFix Socket related tests on Windows
Máté Kocsis [Tue, 4 Aug 2020 07:25:41 +0000 (09:25 +0200)]
Fix Socket related tests on Windows

4 years agoCleanup snmp after resource to object migration
Máté Kocsis [Tue, 4 Aug 2020 07:14:12 +0000 (09:14 +0200)]
Cleanup snmp after resource to object migration

4 years agoFix posix test
Máté Kocsis [Tue, 4 Aug 2020 07:11:43 +0000 (09:11 +0200)]
Fix posix test

4 years agoFix Windows build
Christoph M. Becker [Mon, 3 Aug 2020 22:09:12 +0000 (00:09 +0200)]
Fix Windows build

4 years agoAdd upgrading note for the resource to object migration in ext/sockets
Máté Kocsis [Mon, 3 Aug 2020 21:41:00 +0000 (23:41 +0200)]
Add upgrading note for the resource to object migration in ext/sockets

4 years agoMinor grammar/consistency fixes in upgrade guide
Theodore Brown [Mon, 3 Aug 2020 21:33:16 +0000 (15:33 -0600)]
Minor grammar/consistency fixes in upgrade guide

[ci skip]

4 years agoConvert resources to objects in ext/sockets
Máté Kocsis [Mon, 27 Jul 2020 19:23:27 +0000 (21:23 +0200)]
Convert resources to objects in ext/sockets

Closes GH-5900.

4 years agoDeprecate libxml_disable_entity_loader()
Dik Takken [Thu, 16 Jul 2020 12:20:41 +0000 (14:20 +0200)]
Deprecate libxml_disable_entity_loader()

This method was used to protect code against XXE processing attacks.
Since PHP now requires libxml >= 2.9.0 external entity loading no longer
needs to be disabled to prevent these attacks. It is disabled by default.
Also, the method has an unwanted side effect that causes a lot of
confusion: Parsing XML data from resources like files is no longer possible.

Closes GH-5867.

4 years agoBump libxml version requirement 2.7.6 => 2.9.0
Dik Takken [Thu, 16 Jul 2020 12:19:40 +0000 (14:19 +0200)]
Bump libxml version requirement 2.7.6 => 2.9.0

Since libxml version 2.9.0 external entity loading is disabled by default.
Bumping the version requirement means that XML processing in PHP is no
longer vulnerable to XXE processing attacks by default.

4 years agoFPM: Add pm.status_listen option
Jakub Zelenka [Sat, 1 Aug 2020 13:39:33 +0000 (14:39 +0100)]
FPM: Add pm.status_listen option

This option allows getting status from different endpoint (e.g. port
or UDS file) which is useful for getting status when all children are
busy with serving long running requests.

Internally a new shared pool with ondemand process manager is used. It
means that the status requests have reserved resources and should not
be blocked by other requests.

4 years agoPromote warnings to exceptions in ext/gettext, ext/sysvmsg and ext/xml
Máté Kocsis [Sun, 2 Aug 2020 22:55:02 +0000 (00:55 +0200)]
Promote warnings to exceptions in ext/gettext, ext/sysvmsg and ext/xml

Closes GH-5926

4 years ago[RFC] Only unserialize Phar metadata when getMetadata() is called
Tyson Andre [Tue, 7 Jul 2020 22:47:52 +0000 (18:47 -0400)]
[RFC] Only unserialize Phar metadata when getMetadata() is called

In other words, don't automatically unserialize when the magic
phar:// stream wrappers are used.
RFC: https://wiki.php.net/rfc/phar_stop_autoloading_metadata

Also, change the signature from `getMetadata()`
to `getMetadata(array $unserialize_options = [])`.
Start throwing earlier if setMetadata() is called and serialization threw.

See https://externals.io/message/110856 and
https://bugs.php.net/bug.php?id=76774

This was refactored to add a phar_metadata_tracker for the following reasons:
- The way to properly copy a zval was previously implicit and undocumented
  (e.g. is it a pointer to a raw string or an actual value)
- Avoid unnecessary serialization and unserialization in the most common case
- If a metadata value is serialized once while saving a new/modified phar file,
  this allows reusing the same serialized string.
- Have as few ways to copy/clone/lazily parse metadata (etc.) as possible,
  so that code changes can be limited to only a few places in the future.
- Performance is hopefully not a concern - copying a string should be faster
  than unserializing a value, and metadata should be rare in most cases.

Remove unnecessary skip in a test(Compression's unused)

Add additional assertions about usage of persistent phars

Improve robustness of `Phar*->setMetadata()`

- Add sanity checks for edge cases freeing metadata, when destructors
  or serializers modify the phar recursively.
- Typical use cases of php have phar.readonly=1 and would not be affected.

Closes GH-5855

4 years agoMake http stream wrapper advertise HTTP/1.1 by default
Rowan Tommins [Thu, 11 Jun 2020 18:05:00 +0000 (19:05 +0100)]
Make http stream wrapper advertise HTTP/1.1 by default

In practice, we always act as an HTTP/1.1 client, for compatibility
with servers which ignore protocol version. Sending the version in
the request will avoid problems with servers which don't ignore it.

HTTP/1.0 can still be forced using a stream context option.

Closes GH-5899.

4 years agoMerge branch 'levim/assert-throw'
Levi Morrison [Mon, 3 Aug 2020 14:04:14 +0000 (08:04 -0600)]
Merge branch 'levim/assert-throw'

This changes assert.exception to default to 1, or on by default.
Closes GH-5925.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 3 Aug 2020 13:15:04 +0000 (15:15 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Removed space from bug55086.phpt

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 3 Aug 2020 13:14:36 +0000 (15:14 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Removed space from bug55086.phpt

4 years agoRemoved space from bug55086.phpt
Graham Campbell [Sun, 2 Aug 2020 11:04:11 +0000 (12:04 +0100)]
Removed space from bug55086.phpt

Closes GH-5923.

4 years agoFix #79923: fix socket_set_option_bindtodevice test
Santiago M. Mola [Sat, 1 Aug 2020 16:26:57 +0000 (18:26 +0200)]
Fix #79923: fix socket_set_option_bindtodevice test

Closes GH-5924.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 3 Aug 2020 12:56:57 +0000 (14:56 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #79924

4 years agoFix bug #79924
Nikita Popov [Mon, 3 Aug 2020 12:55:18 +0000 (14:55 +0200)]
Fix bug #79924

Move functions that are only used with ipv6 support under
HAVE_IPV6 checks.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 3 Aug 2020 12:48:40 +0000 (14:48 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  set -ex on travis/compile.sh

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 3 Aug 2020 12:48:18 +0000 (14:48 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  set -ex on travis/compile.sh

4 years agoset -ex on travis/compile.sh
Santiago M. Mola [Sat, 1 Aug 2020 15:43:08 +0000 (17:43 +0200)]
set -ex on travis/compile.sh

-e to fail early: ./configure may fail and further errors from make bury
the original problem in the logs.

-x for easier debugging

4 years agoPromote "undefined array key" notice to warning
Nikita Popov [Mon, 3 Aug 2020 09:26:54 +0000 (11:26 +0200)]
Promote "undefined array key" notice to warning

This implements the last remaining part of the
https://wiki.php.net/rfc/engine_warnings RFC.

Closes GH-5927.

4 years agoFix fix for bug #79877 for PHP 8
Christoph M. Becker [Mon, 3 Aug 2020 10:01:12 +0000 (12:01 +0200)]
Fix fix for bug #79877 for PHP 8

PHP 8 is supposed to throw here.

4 years agoDon't suppress notices in rfc1867 tests
Nikita Popov [Mon, 3 Aug 2020 09:58:28 +0000 (11:58 +0200)]
Don't suppress notices in rfc1867 tests

The references notices in debug builds don't seem to be present
anymore.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Mon, 3 Aug 2020 09:21:39 +0000 (11:21 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  [ci skip] Add missing NEWS entries

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 3 Aug 2020 09:18:45 +0000 (11:18 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Add missing NEWS entries

4 years ago[ci skip] Add missing NEWS entries
Christoph M. Becker [Mon, 3 Aug 2020 09:08:31 +0000 (11:08 +0200)]
[ci skip] Add missing NEWS entries

4 years agoConvert SPL illegal offset type into TypeError
Nikita Popov [Mon, 3 Aug 2020 09:16:59 +0000 (11:16 +0200)]
Convert SPL illegal offset type into TypeError

Make this consistent with the corresponding engine behavior.
Also adjust the messages to match.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Mon, 3 Aug 2020 09:15:24 +0000 (11:15 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #79877: getimagesize function silently truncates after a null byte
  Fix #79797: Use of freed hash key in the phar_parse_zipfile function
  Fix #79877: getimagesize function silently truncates after a null byte
  Fix #79797: Use of freed hash key in the phar_parse_zipfile function

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 3 Aug 2020 09:13:49 +0000 (11:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79877: getimagesize function silently truncates after a null byte
  Fix #79797: Use of freed hash key in the phar_parse_zipfile function

4 years agodatetime: new format "p", same as "P" but returning "Z" for UTC
Gregor Harlan [Sun, 26 Jul 2020 18:29:40 +0000 (20:29 +0200)]
datetime: new format "p", same as "P" but returning "Z" for UTC

4 years agoFix bug #79925
Nikita Popov [Mon, 3 Aug 2020 08:34:39 +0000 (10:34 +0200)]
Fix bug #79925

If the expected return type of a magic method is "object", we also
need to allow class types and "static" to comply with covariance.

4 years agoEnforce __set_state() parameter type
Nikita Popov [Mon, 3 Aug 2020 08:23:06 +0000 (10:23 +0200)]
Enforce __set_state() parameter type

This fixes one of the issues reported in bug #79925. The parameter
type check for this particular method was missed.

4 years agoFix handling of nullsafe method in empty()
Nikita Popov [Mon, 3 Aug 2020 08:16:04 +0000 (10:16 +0200)]
Fix handling of nullsafe method in empty()

Fixes oss-fuzz #24627.

4 years agoUpdate NEWS
Stanislav Malyshev [Mon, 3 Aug 2020 08:14:38 +0000 (01:14 -0700)]
Update NEWS

4 years agoFix #79877: getimagesize function silently truncates after a null byte
Christoph M. Becker [Tue, 21 Jul 2020 09:07:43 +0000 (11:07 +0200)]
Fix #79877: getimagesize function silently truncates after a null byte

We have to check for NUL bytes if `getimagesize()` has been called.

4 years agoFix #79797: Use of freed hash key in the phar_parse_zipfile function
Christoph M. Becker [Tue, 14 Jul 2020 15:04:24 +0000 (17:04 +0200)]
Fix #79797: Use of freed hash key in the phar_parse_zipfile function

We must not use heap memory after we freed it.

4 years agoFix #79877: getimagesize function silently truncates after a null byte
Christoph M. Becker [Tue, 21 Jul 2020 09:07:43 +0000 (11:07 +0200)]
Fix #79877: getimagesize function silently truncates after a null byte

We have to check for NUL bytes if `getimagesize()` has been called.

4 years agoFix #79797: Use of freed hash key in the phar_parse_zipfile function
Christoph M. Becker [Tue, 14 Jul 2020 15:04:24 +0000 (17:04 +0200)]
Fix #79797: Use of freed hash key in the phar_parse_zipfile function

We must not use heap memory after we freed it.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Mon, 3 Aug 2020 07:15:50 +0000 (09:15 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Enable libxml entity loader test case on Windows

4 years agoEnable libxml entity loader test case on Windows
Christoph M. Becker [Mon, 3 Aug 2020 07:12:46 +0000 (09:12 +0200)]
Enable libxml entity loader test case on Windows

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Mon, 3 Aug 2020 06:56:37 +0000 (23:56 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #79877: getimagesize function silently truncates after a null byte
  Fix #79797: Use of freed hash key in the phar_parse_zipfile function

4 years agoDrop the unneeded pointer casting
tangl163 [Sat, 1 Aug 2020 03:56:16 +0000 (11:56 +0800)]
Drop the unneeded pointer casting

The standard says that "A pointer to void may be converted to or from a
pointer to any object type". So the casting is unneeded.

REF:
    * c11: http://port70.net/~nsz/c/c11/n1570.html#6.3.2.3p1
    * c99: http://port70.net/~nsz/c/c99/n1256.html

Closes GH-5916