]> granicus.if.org Git - php/log
php
3 years agoPrepare for 7.3.21 PHP-7.3.21 php-7.3.21
Christoph M. Becker [Tue, 4 Aug 2020 07:10:53 +0000 (09:10 +0200)]
Prepare for 7.3.21

3 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.

(cherry picked from commit ff577b04c0d250473a0ef46f8e332960fec3ca2c)

3 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.

(cherry picked from commit 7355ab81763a3d6a04ac11660e6a16d58838d187)

3 years agoBump version to 7.3.21RC1 php-7.3.21RC1
Christoph M. Becker [Tue, 21 Jul 2020 07:13:03 +0000 (09:13 +0200)]
Bump version to 7.3.21RC1

3 years agoFix #63527: DCOM does not work with Username, Password parameter
Christoph M. Becker [Fri, 10 Jul 2020 13:43:32 +0000 (15:43 +0200)]
Fix #63527: DCOM does not work with Username, Password parameter

We must not mix multibyte and wide character strings in the
`COAUTHIDENTITY` structure.  Using wide character strings throughout
would have the advantage that the remote connection can be established
regardless of the code page of the server, but that would more likely
break BC, so we just drop the wide character string conversion of the
username.

3 years agoFix bug #78008: dns_check_record() always return true on Alpine
Andy Postnikov [Tue, 14 Jul 2020 01:14:05 +0000 (04:14 +0300)]
Fix bug #78008: dns_check_record() always return true on Alpine

- free handle before return result
- cleaned up remaining usage of MAXPACKET
- update dns_get_mx() to use the same approach

Closes GH-5854.

3 years agoFixed bug #79849
Evgeny Stepanischev [Mon, 13 Jul 2020 12:16:39 +0000 (15:16 +0300)]
Fixed bug #79849

Closes GH-5853.

3 years agoFixed BC break of php_debug_zval_dump
twosee [Sat, 11 Jul 2020 10:30:28 +0000 (18:30 +0800)]
Fixed BC break of php_debug_zval_dump

It introduced by fixing bug #79830

3 years agoFixed bug #79830 introduced by fixing bug #79821
twosee [Sat, 11 Jul 2020 06:37:25 +0000 (14:37 +0800)]
Fixed bug #79830 introduced by fixing bug #79821

This also fixes memory error in debug_zval_dump and var_export.

3 years agoFixed bug #79821
twosee [Fri, 10 Jul 2020 22:14:22 +0000 (06:14 +0800)]
Fixed bug #79821

HashTable was reallocated (zend_hash_packed_grow) during php_var_dump, so we should call GC_ADDREF to make SEPARATE_ARRAY work.

Closes GH-5837.

3 years agoFixed bug #79817
Nikita Popov [Fri, 10 Jul 2020 12:06:41 +0000 (14:06 +0200)]
Fixed bug #79817

Use *_IND macros in a few places in string.c.

3 years agoFix some memory bugs in ldap.c
Paweł Tomulik [Fri, 3 Jul 2020 00:11:44 +0000 (02:11 +0200)]
Fix some memory bugs in ldap.c

3 years agoFix bug #79787
XXiang [Sat, 4 Jul 2020 14:12:57 +0000 (22:12 +0800)]
Fix bug #79787

Closes GH-5807.

3 years agoReport len as -1 instead of INT_MAX
Nikita Popov [Wed, 3 Jun 2020 08:15:54 +0000 (10:15 +0200)]
Report len as -1 instead of INT_MAX

Per docs it should be -1. And would be on 32-bit systems, but
not on 64-bit systems.

(cherry picked from commit 39111585a2f8e40e72bdc662eb8b2e3c19e93615)

3 years agoMerge branch 'PHP-7.2' into PHP-7.3
Sara Golemon [Tue, 7 Jul 2020 19:33:11 +0000 (19:33 +0000)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Prep for 7.2.33
  Prep NEWS for 7.2.32 release

3 years agoPrep for 7.2.33
Sara Golemon [Tue, 7 Jul 2020 19:31:32 +0000 (19:31 +0000)]
Prep for 7.2.33

3 years agoPrep NEWS for 7.2.32 release PHP-7.2.32
Sara Golemon [Tue, 7 Jul 2020 19:31:05 +0000 (19:31 +0000)]
Prep NEWS for 7.2.32 release

3 years agoDon't use deprecated curly brace offset syntax
Christoph M. Becker [Tue, 7 Jul 2020 11:21:26 +0000 (13:21 +0200)]
Don't use deprecated curly brace offset syntax

(cherry picked from commit 7ec3aa1871074f5de25865af42c984a7668eb85f)

Better safe than sorry in case someone ever builds PHP 7.3 with a
future version of PHP SDK with bundled PHP 8.

3 years agoFixed bug #79792
Nikita Popov [Tue, 7 Jul 2020 09:57:01 +0000 (11:57 +0200)]
Fixed bug #79792

We need to remove the iterators even if the array is empty (we
will not create one if the first place, but the array may become
empty after the fact).

3 years agoFixed bug #79778
Nikita Popov [Tue, 7 Jul 2020 08:11:34 +0000 (10:11 +0200)]
Fixed bug #79778

In the interest of avoiding side-effects during dumping, I'm
replacing the value with a <constant ast> string instead of
performing an update constant operation.

3 years agoRemove bogus generator iterator dtor
Nikita Popov [Tue, 30 Jun 2020 15:28:47 +0000 (17:28 +0200)]
Remove bogus generator iterator dtor

Fixes a use-after-free encountered in Symfony's SecurityBundle.
I don't have a reproducer for this, and believe the issue can only
occur if we leak an iterator (the leak is a separate issue).

We should not free the generator iterator here, because we do not
own it. The code that fetched the iterator is responsible for
releasing it. In the rare case where we do hit this code-path,
we cause a use-after-free.

3 years agoFix leak when setting cyclic previous exception in finally
Nikita Popov [Tue, 30 Jun 2020 10:22:41 +0000 (12:22 +0200)]
Fix leak when setting cyclic previous exception in finally

A curious exception handling pattern found in Symfony's HttpClient.

3 years agoFix #70362: Can't copy() large 'data://' with open_basedir
Christoph M. Becker [Thu, 5 Mar 2020 11:20:04 +0000 (12:20 +0100)]
Fix #70362: Can't copy() large 'data://' with open_basedir

open_basedir is only relevant for plain files, so there is no need to
check it for other URL wrappers.

3 years agoFix #63208: BSTR to PHP string conversion not binary safe
Christoph M. Becker [Mon, 29 Jun 2020 15:38:14 +0000 (17:38 +0200)]
Fix #63208: BSTR to PHP string conversion not binary safe

A `BSTR` is similar to a `zend_string`; it stores the length of the
string just before the actual string, and thus the string may contain
NUL bytes.  However, `php_com_olestring_to_string()` is supposed to
deal with arbitrary `OLECHAR*`s which may not be `BSTR`s, so we
introduce `php_com_bstr_to_string()` and use it for the only case where
we actually have to deal with `BSTR`s which may contain NUL bytes.

Contrary to `php_com_olestring_to_string()` we return a `zend_string`,
so we can save the re-allocation when converting to a `zval`.

We also cater to `php_com_string_to_olestring()` not being binary safe,
with basically the same fix we did for `php_com_olestring_to_string()`.

3 years agoFix #79756: finfo_file crash (FILEINFO_MIME)
Christoph M. Becker [Mon, 29 Jun 2020 14:10:33 +0000 (16:10 +0200)]
Fix #79756: finfo_file crash (FILEINFO_MIME)

If `ctime` or `asctime` return `NULL`, we must not attempt to copy the
buffer, but rather return `NULL` as well.

3 years agoFixed bug #79741
Nikita Popov [Fri, 26 Jun 2020 10:26:46 +0000 (12:26 +0200)]
Fixed bug #79741

3 years agoFixed bug #79030 Use usec from apache request time
Herbert256 [Wed, 24 Jun 2020 07:44:35 +0000 (09:44 +0200)]
Fixed bug #79030 Use usec from apache request time

Don't unnecessarily truncate to milliseconds.

Closes GH-5760.

3 years agoFix #55857: ftp_size on large files
Christoph M. Becker [Tue, 23 Jun 2020 13:17:31 +0000 (15:17 +0200)]
Fix #55857: ftp_size on large files

`atol()` returns a `long` which is not the same as `zend_long` on
LLP64; we use `ZEND_ATOL()` instead.

There is no need for a new test case, since filesize_large.phpt already
tests for that behavior; unfortunately, the FTP test suite relies on
`pcntl_fork()` and therefore cannot be run on Windows.

3 years ago7.3 is now 7.3.21-dev
Christoph M. Becker [Tue, 23 Jun 2020 08:29:42 +0000 (10:29 +0200)]
7.3 is now 7.3.21-dev

3 years agoFixed bug #79570
Böszörményi Zoltán [Fri, 19 Jun 2020 12:31:28 +0000 (14:31 +0200)]
Fixed bug #79570

Use the same logic for getgrgid_r, getpwnam_r and getpwuid_r
as for getgrnam_r in #75696

Closes GH-5740.

3 years agoFixed bug #79710
Nikita Popov [Fri, 19 Jun 2020 08:46:02 +0000 (10:46 +0200)]
Fixed bug #79710

Make sure we don't use zresource after the stream has been destroyed.

3 years agoFix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes
Christoph M. Becker [Sat, 13 Jun 2020 12:09:28 +0000 (14:09 +0200)]
Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes

Even if the length of a maker note does not match our expectations
(either because the maker note is corrupted, or because our
expectations do not quite match reality), there is no need to let
parsing fail; we can still go on parsing the other meta information.

3 years agoFix #79676: imagescale adds black border with IMG_BICUBIC
Christoph M. Becker [Fri, 5 Jun 2020 14:36:00 +0000 (16:36 +0200)]
Fix #79676: imagescale adds black border with IMG_BICUBIC

We have to loop over all image pixels to avoid the black border.  This
is also done in external libgd in `_gdScaleOneAxis` and `_gdScalePass`.

3 years agoFix possibly unsupported timercmp() usage
Christoph M. Becker [Tue, 9 Jun 2020 08:12:32 +0000 (10:12 +0200)]
Fix possibly unsupported timercmp() usage

The `timercmp()` manpage[1] points out that some systems have a broken
implementation which does not support `>=`.  This is definitely the
case for the Windows SDK, which only supports `<` and `>`.

[1] <https://linux.die.net/man/3/timercmp>

3 years agoFix #62890: default_socket_timeout=-1 causes connection to timeout
Christoph M. Becker [Tue, 9 Jun 2020 10:42:02 +0000 (12:42 +0200)]
Fix #62890: default_socket_timeout=-1 causes connection to timeout

While unencrypted connections ignore negative timeouts, SSL/TLS
connections did not special case that, and so always failed due to
timeout.

3 years ago[ci skip] Update NEWS
Christoph M. Becker [Tue, 9 Jun 2020 14:37:17 +0000 (16:37 +0200)]
[ci skip] Update NEWS

3 years agoFix #74267: segfault with streams and invalid data
Christoph M. Becker [Mon, 8 Jun 2020 21:19:43 +0000 (23:19 +0200)]
Fix #74267: segfault with streams and invalid data

If the current character is a line break character, it cannot be a tab
or space character, so we would always fail with an invalid sequence
error.  Obviously, these `scan_stat == 4` conditions are meant to be
exclusive.

Furthermore, if `in_pp == NULL || in_left_p == NULL` is true, we hit a
segfault if we are not returning right away.  Obviously, the additional
constraints don't make sense, so we remove them.

3 years agoFix #73527: Invalid memory access in php_filter_strip
Christoph M. Becker [Thu, 4 Jun 2020 09:49:59 +0000 (11:49 +0200)]
Fix #73527: Invalid memory access in php_filter_strip

3 years agoFix #79668: get_defined_functions(true) may miss functions
Christoph M. Becker [Wed, 3 Jun 2020 10:05:00 +0000 (12:05 +0200)]
Fix #79668: get_defined_functions(true) may miss functions

Instead of some brittle and unefficient string matching, we can just
check for the function handler.

3 years agoFix #79664: PDOStatement::getColumnMeta fails on empty result set
Christoph M. Becker [Tue, 2 Jun 2020 07:36:39 +0000 (09:36 +0200)]
Fix #79664: PDOStatement::getColumnMeta fails on empty result set

As its name suggests, `sqlite3_data_count` returns the number of
columns in the current row of the result set; we are interested in the
number of columns regardless of the current row, so we have to use
`sqlite3_column_count` instead.

3 years agoFix #79650: php-win.exe 100% cpu lockup
Christoph M. Becker [Sun, 31 May 2020 11:28:09 +0000 (13:28 +0200)]
Fix #79650: php-win.exe 100% cpu lockup

As of PHP 7.3.0, `sapi_cli_single_write()` is supposed to return `< 0`
on failure, but `fwrite()` returns a `size_t`, and signals error by
setting the stream's error indicator.  We have to cater to that.

4 years agoFix PVS-Studio integration
Christoph M. Becker [Thu, 28 May 2020 13:20:06 +0000 (15:20 +0200)]
Fix PVS-Studio integration

Without this configuration option, PVS-Studio looks for preprocessed
files (*.i), but these do not exists.

4 years agoFixed possible usage of uninitialized value
Dmitry Stogov [Wed, 27 May 2020 08:25:18 +0000 (11:25 +0300)]
Fixed possible usage of uninitialized value

4 years ago7.3.20 will be next
Christoph M. Becker [Tue, 26 May 2020 08:53:22 +0000 (10:53 +0200)]
7.3.20 will be next

4 years agoFix #79615: Wrong GIF header written in GD GIFEncode
Christoph M. Becker [Fri, 22 May 2020 07:11:28 +0000 (09:11 +0200)]
Fix #79615: Wrong GIF header written in GD GIFEncode

The color resolution is expected in bits 4-6 of the packed fields byte
of the logical screen descriptor (byte 10 of the GIF data stream),
according to the specification[1], section 18.

[1] <https://www.w3.org/Graphics/GIF/spec-gif89a.txt>

4 years agoFix INI setting member name
Christoph M. Becker [Mon, 18 May 2020 14:07:16 +0000 (16:07 +0200)]
Fix INI setting member name

Since the member is not used in `OnUpdateEol()` that's not really an
issue, but still it's confusing to apparently have two INI settings
targeting the same member.

4 years agoPut Xdebug 3 into 'off' mode for run-tests.php
Derick Rethans [Mon, 18 May 2020 12:49:12 +0000 (13:49 +0100)]
Put Xdebug 3 into 'off' mode for run-tests.php

4 years agoFix #79596: MySQL FLOAT truncates to int some locales
Christoph M. Becker [Fri, 15 May 2020 07:09:41 +0000 (09:09 +0200)]
Fix #79596: MySQL FLOAT truncates to int some locales

We must not do locale aware float to string conversion here; instead
we using our `snprintf()` implementation with the `F` specifier.

4 years agoFix #79588: Boolean opcache settings ignore on/off values
Christoph M. Becker [Tue, 12 May 2020 14:14:54 +0000 (16:14 +0200)]
Fix #79588: Boolean opcache settings ignore on/off values

We should display boolean INI settings as boolean.

4 years agoFix #79489: .user.ini does not inherit
Christoph M. Becker [Tue, 5 May 2020 08:36:16 +0000 (10:36 +0200)]
Fix #79489: .user.ini does not inherit

On Windows, PATH_TRANSLATED may contain backslashes as well as slashes,
so we must not only check for `DEFAULT_SLASH`.

4 years ago[ci skip] Update NEWS
Christoph M. Becker [Tue, 12 May 2020 09:16:55 +0000 (11:16 +0200)]
[ci skip] Update NEWS

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 12 May 2020 07:19:11 +0000 (09:19 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

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

4 years agobump version to 7.2.32-dev
Remi Collet [Tue, 12 May 2020 07:16:01 +0000 (09:16 +0200)]
bump version to 7.2.32-dev

4 years agoUpdate NEWS
Stanislav Malyshev [Mon, 11 May 2020 21:28:51 +0000 (14:28 -0700)]
Update NEWS

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Mon, 11 May 2020 21:20:41 +0000 (14:20 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30

4 years agoFix #78876: Long variables cause OOM and temp files are not cleaned
Christoph M. Becker [Wed, 18 Mar 2020 09:57:42 +0000 (10:57 +0100)]
Fix #78876: Long variables cause OOM and temp files are not cleaned

We use the proper type for size calculations, which is `size_t`.

4 years agoFix #78875: Long filenames cause OOM and temp files are not cleaned
Christoph M. Becker [Wed, 18 Mar 2020 09:26:53 +0000 (10:26 +0100)]
Fix #78875: Long filenames cause OOM and temp files are not cleaned

We must not cast `size_t` to `int` (unless the `size_t` value is
guaranteed to be less than or equal to `INT_MAX`).  In this case we can
declare `array_len` as `size_t` in the first place.

4 years agoFix default sendmail path when not found during build
Indrek Ardel [Sat, 9 May 2020 00:08:14 +0000 (03:08 +0300)]
Fix default sendmail path when not found during build

Closes GH-5548.

4 years agoFix #79566: Private SHM is not private on Windows
Christoph M. Becker [Tue, 5 May 2020 07:31:17 +0000 (09:31 +0200)]
Fix #79566: Private SHM is not private on Windows

We map the POSIX semantics of `IPC_PRIVATE` by creating unnamed file
mapping objects on Windows.  While that is not particularly useful for
ext/shmop, which is the only bundled extension which uses `shmget()`,
it may be useful for external extensions.

4 years agoFix #79561: dns_get_record() fails with DNS_ALL
Christoph M. Becker [Mon, 4 May 2020 14:51:51 +0000 (16:51 +0200)]
Fix #79561: dns_get_record() fails with DNS_ALL

Since Windows has its own definitions of the `PHP_DNS_*` macros, we
have to use these when registering the PHP constants.

4 years agoFixed bug #79535
Nikita Popov [Mon, 4 May 2020 12:50:31 +0000 (14:50 +0200)]
Fixed bug #79535

We did not allocate a cache slot for FETCH_CLASS. This is already
fixed on newer PHP versions.

4 years agoAdd basic sapi_windows_cp_conv() test
Christoph M. Becker [Mon, 4 May 2020 09:46:54 +0000 (11:46 +0200)]
Add basic sapi_windows_cp_conv() test

This function is lacking any tests so far.

4 years agoFix #79528: Different object of the same xml between 7.4.5 and 7.4.4
Christoph M. Becker [Fri, 1 May 2020 10:19:32 +0000 (12:19 +0200)]
Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4

Revert "Fix #61597: SXE properties may lack attributes and content"

This reverts commit 7c081db885756d7b176a55b90b8746f664d1e042.

4 years agoBump version
Christoph M. Becker [Tue, 28 Apr 2020 07:10:50 +0000 (09:10 +0200)]
Bump version

4 years agoFix #79470: PHP incompatible with 3rd party file system on demand
Christoph M. Becker [Fri, 24 Apr 2020 15:24:25 +0000 (17:24 +0200)]
Fix #79470: PHP incompatible with 3rd party file system on demand

We add support for Activision HSM (`IO_REPARSE_TAG_ACTIVISION_HSM`) and
VFS for Git (`IO_REPARSE_TAG_PROJFS`).  The latter fixes bug #78784.

4 years agoUpdated to version 2020.1 (2020a)
Derick Rethans [Fri, 24 Apr 2020 11:31:30 +0000 (12:31 +0100)]
Updated to version 2020.1 (2020a)

4 years agoAdd additional preg_match test case
Graham Campbell [Tue, 7 Apr 2020 13:41:06 +0000 (15:41 +0200)]
Add additional preg_match test case

(cherry picked from commit a1a044dcc74379fafb2b63db5ab033aa062aada7
on author's explicit request)

4 years agoFix #79503: Memory leak on duplicate metadata
Christoph M. Becker [Wed, 22 Apr 2020 12:11:13 +0000 (14:11 +0200)]
Fix #79503: Memory leak on duplicate metadata

Duplicate metadata can only happen if someone tampers with the phar, so
we can and should treat that as error.

4 years agoFix #79491: Search for .user.ini extends up to root dir
Christoph M. Becker [Sun, 19 Apr 2020 12:22:24 +0000 (14:22 +0200)]
Fix #79491: Search for .user.ini extends up to root dir

The `start` parameter of `php_cgi_ini_activate_user_config` is supposed
to hold the byte offset of the doc root in the given `path`.  However,
the current expression which fixes a potential type incompatibility
will ever only evaluate to zero or one, because it uses the *logical*
and operator (`&&`).  Furthermore we notice that subtracting one from
`doc_root_len` is not necessary, so there is even no need for the
`start` parameter at all.

4 years agoApply doc root fix for FPM
Nikita Popov [Mon, 20 Apr 2020 08:46:20 +0000 (10:46 +0200)]
Apply doc root fix for FPM

This is the change from GH-5417 but for FPM. This was stripping the
last character from the doc_root. Given how it is used, this should
be harmless, but let's make it less confusing...

4 years agoFix #79497: Fix php_openssl_subtract_timeval()
Joe Cai [Sun, 19 Apr 2020 23:03:11 +0000 (09:03 +1000)]
Fix #79497: Fix php_openssl_subtract_timeval()

I stumbled upon this while debugging a strange issue with
stream_socket_client() where it randomly throws out errors when
the connection timeout is set to below 1s. The logic to calculate
time difference in php_openssl_subtract_timeval() is wrong when
a.tv_usec < b.tv_usec, causing connection errors before the timeout
is reached.

4 years agozend_timeout() may access EX(opline)
Dmitry Stogov [Fri, 17 Apr 2020 11:55:14 +0000 (14:55 +0300)]
zend_timeout() may access EX(opline)

4 years agoFix MySQL local infile / attr handling on big endian systems
guirish [Fri, 10 Apr 2020 09:45:40 +0000 (05:45 -0400)]
Fix MySQL local infile / attr handling on big endian systems

Make sure pointer types match what is used by libmysql everywhere.

Closes GH-5380.

4 years agoFixed bug #79477
Nikita Popov [Wed, 15 Apr 2020 09:20:33 +0000 (11:20 +0200)]
Fixed bug #79477

Make sure to deindirect properties when creating array.

4 years agoAdd missing CVE
Christoph M. Becker [Tue, 14 Apr 2020 16:18:18 +0000 (18:18 +0200)]
Add missing CVE

4 years agoUpdate NEWS for 7.2.31
Sara Golemon [Tue, 14 Apr 2020 15:38:55 +0000 (15:38 +0000)]
Update NEWS for 7.2.31

4 years agoUpdate CREDITS for PHP 7.2.30
Sara Golemon [Tue, 14 Apr 2020 15:16:26 +0000 (15:16 +0000)]
Update CREDITS for PHP 7.2.30

4 years agoUpdate NEWS for PHP 7.2.30
Sara Golemon [Tue, 14 Apr 2020 15:16:26 +0000 (15:16 +0000)]
Update NEWS for PHP 7.2.30

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Sara Golemon [Tue, 14 Apr 2020 14:31:35 +0000 (10:31 -0400)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fixed bug #79468
  NEWS

4 years agoFixed bug #79468
dinosaur [Mon, 13 Apr 2020 23:46:34 +0000 (07:46 +0800)]
Fixed bug #79468

Close the stream filter resources when removing them from the stream.

4 years agoNEWS
Sara Golemon [Tue, 14 Apr 2020 14:25:37 +0000 (10:25 -0400)]
NEWS

4 years agoDon't leak peername if accept fails
Nikita Popov [Tue, 14 Apr 2020 14:05:57 +0000 (16:05 +0200)]
Don't leak peername if accept fails

Even if the accept fails, the peername may be populated.

4 years agoFix test cases
Christoph M. Becker [Tue, 14 Apr 2020 11:55:56 +0000 (13:55 +0200)]
Fix test cases

4 years agoFixed bug #79468
dinosaur [Mon, 13 Apr 2020 23:46:34 +0000 (07:46 +0800)]
Fixed bug #79468

Close the stream filter resources when removing them from the stream.

4 years agoAdd NEWS entries [ci skip]
Christoph M. Becker [Tue, 14 Apr 2020 06:53:35 +0000 (08:53 +0200)]
Add NEWS entries [ci skip]

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Tue, 14 Apr 2020 04:09:08 +0000 (21:09 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix bug #79465 - use unsigneds as indexes.
  Fix bug #79330 - make all execution modes consistent in rejecting \0

4 years agoFix bug #79465 - use unsigneds as indexes.
Stanislav Malyshev [Tue, 14 Apr 2020 04:07:04 +0000 (21:07 -0700)]
Fix bug #79465 - use unsigneds as indexes.

4 years agoFix bug #79330 - make all execution modes consistent in rejecting \0
Stanislav Malyshev [Tue, 14 Apr 2020 04:00:44 +0000 (21:00 -0700)]
Fix bug #79330 - make all execution modes consistent in rejecting \0

4 years agoFix memory leak introduced by fixing bug #78221
Christoph M. Becker [Wed, 8 Apr 2020 08:35:54 +0000 (10:35 +0200)]
Fix memory leak introduced by fixing bug #78221

We have to free the retrieved text content; to keep the code readable,
we extract a helper function to check for empty nodes.  Unfortunately,
we cannot use xmlIsBlankNode(), because that also recognizes whitespace
only text content.

We also make sure to properly handle NULL returns from
xmlNodeGetContent().

4 years agoRevert "Went to fast and forgot to update tests"
George Peter Banyard [Tue, 7 Apr 2020 20:24:40 +0000 (22:24 +0200)]
Revert "Went to fast and forgot to update tests"

This reverts commit 656eac74fa6074aebc087bb73d2e4651f7dc8c9e.

4 years agoRevert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character...
George Peter Banyard [Tue, 7 Apr 2020 20:23:24 +0000 (22:23 +0200)]
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"

This commit brings some substantial changes in behaviour due to the weird implementation.
This will be fixed in master due to BC concerns.

This reverts commit 1333b46d6dc0c293c1fd626803f91bc69743eb79.

4 years agoFix #78221: DOMNode::normalize() doesn't remove empty text nodes
Christoph M. Becker [Wed, 11 Mar 2020 12:02:09 +0000 (13:02 +0100)]
Fix #78221: DOMNode::normalize() doesn't remove empty text nodes

If a text node is not followed by another text node, we remove it, if
its textContent is empty.

4 years agoWent to fast and forgot to update tests
George Peter Banyard [Fri, 3 Apr 2020 20:03:00 +0000 (22:03 +0200)]
Went to fast and forgot to update tests

However due to the really lax conversion to integer all strings pass as 0

4 years agoFix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails
George Peter Banyard [Fri, 3 Apr 2020 19:16:04 +0000 (21:16 +0200)]
Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails

4 years agoFix incorrect free for last_message
Qianqian Bu [Fri, 3 Apr 2020 07:44:41 +0000 (15:44 +0800)]
Fix incorrect free for last_message

In commit a7305eb539596e175bd6c3ae9a20953358c5d677 the last_message
field of the connection object was changed to be always non-persistent.
But there is a place on change_user path that still treats it
depending on conn->persistent flag. This will cause PHP crash after
com_change_user success when there is last_message set

4 years agoFixed bug #79434
Nikita Popov [Thu, 2 Apr 2020 14:32:57 +0000 (16:32 +0200)]
Fixed bug #79434

4 years agoFix literal compaction collision between string and double
Nikita Popov [Wed, 1 Apr 2020 12:20:59 +0000 (14:20 +0200)]
Fix literal compaction collision between string and double

For the sake of simplicity I'm using a separate hashtable, rather
than trying to do hash perturabation on the double strings.

4 years agoAdd NEWS entryc [ci skip]
Christoph M. Becker [Wed, 1 Apr 2020 07:26:20 +0000 (09:26 +0200)]
Add NEWS entryc [ci skip]

4 years agoFix bug 79441
George Peter Banyard [Wed, 1 Apr 2020 02:29:20 +0000 (04:29 +0200)]
Fix bug 79441

4 years agoNext is 7.3.18
Christoph M. Becker [Tue, 31 Mar 2020 08:22:55 +0000 (10:22 +0200)]
Next is 7.3.18