Commit Graph

12482 Commits

Author SHA1 Message Date
Derick Rethans
499bf91cd0 Prepare for 7.4.11 2020-08-18 08:06:20 +01:00
Nikita Popov
8bda799d6f Fixed bug #79724 2020-08-13 17:25:51 +02:00
Nikita Popov
981af26d7b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
2020-08-11 17:13:28 +02:00
Ahmed Abdou
2fe2e5b48f Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
PDO driver constructors are throwing PdoException without setting
errorInfo, so create a new reusable function that throws exceptions
for PDO and will also set the errorInfo. Use this function in
pdo_mysql, pdo_sqlite, and pdo_pgsql.
2020-08-11 17:12:48 +02:00
Nikita Popov
5c5508698d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #75785 by attempt switching endianness on Maker's Note
2020-08-11 16:27:06 +02:00
Nawarian
2fa4ca95db Fix bug #75785 by attempt switching endianness on Maker's Note
Different manufacturer models may come with a
different endianness (motorola/intel) format. In
order to avoid a big refactor and a gigantic lookup
table, this commit simply attempts to switch the
endianness and proceed when values are acceptable.

Closes GH-5849.
2020-08-11 16:26:34 +02:00
Nikita Popov
4609ded082 Fixed bug #79917
op_arrays can be shared on two levels: Either the op_array is
completely shared, or it is distinct but shares all members
(apart from static_variables).

The the op_array is distinct, we need to make sure to properly
initialize the MAP_PTR structures.
2020-08-11 14:58:54 +02:00
Christoph M. Becker
183b853dc6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #48585: com_load_typelib holds reference, fails on second call
2020-08-11 11:28:07 +02:00
Christoph M. Becker
dc108feab8 Fix #48585: com_load_typelib holds reference, fails on second call
Whether the type library is cached is actually irrelevant here; what
matters is that the symbols are imported, and since these are not
cached, we have to import them for every request.  And we cannot cache
the symbols, because the import depends on the current codepage, but
the codepage is a `PHP_INI_ALL` setting.
2020-08-11 11:26:50 +02:00
Nikita Popov
66d9f4d985 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79951
2020-08-11 10:35:25 +02:00
Nikita Popov
9d9dffe60a Fixed bug #79951
One branch did not release tmp_replace_entry_str.

Also reduce the scope of some variables.
2020-08-11 10:33:59 +02:00
Nikita Popov
5b8b480d23 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #79944
2020-08-10 20:43:13 +02:00
Nikita Popov
a06eed0c0e Fix bug #79944
Only return true from dns_get_mx if we actually found any MX record.
2020-08-10 20:42:50 +02:00
Christoph M. Becker
2830c3ef52 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79922: Crash after multiple calls to xml_parser_free()
2020-08-10 12:25:26 +02:00
Christoph M. Becker
0af3f49312 Fix #79922: Crash after multiple calls to xml_parser_free()
We must not call `zend_list_delete()` in resource closer functions
exposed to userland, because decreasing the refcount there leads to
use-after-free scenarios.  In this case, commit 4a42fbb worked for
typical use-cases where `xml_parser_free()` has been called exactly
once for the resource, because there is an internal zval (`->index`)
referencing the same resource which already increased the refcount by
one.  However, when `xml_parser_free()` is called multiple times on the
same XML parser resource, the resource would be freed prematurely.

Instead we forcefully close the resource in `xml_parser_free()`.  We
also could decrease the refcount of the resource there, but that would
require to call `xml_parser_free()` which is somewhat uncommon, and
would be particularly bad wrt. PHP 8 where that function is a NOP, and
as such doesn't have to be called.  So we do no longer increase the
refcount of the resource when copying it to the internal zval, and let
the usualy refcounting semantics take care of the resource destruction.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=4a42fbbbc73aad7427aef5c89974d1833636e082>
2020-08-10 12:23:44 +02:00
Nikita Popov
2d087210eb Fixed bug #79947
Move the FREE_OP for op_data out of the zend_binary_assign_op_dim_slow()
slow path, so it can be used by the other error path as well. This
makes ASSIGN_DIM_OP structurally more similar to ASSIGN_DIM.
2020-08-10 10:11:56 +02:00
Nikita Popov
fab2c3ba86 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #70574: Move files to proper locale dir
2020-08-07 14:37:43 +02:00
Florian Engelhardt
5be670265b Fix bug #70574: Move files to proper locale dir
Closes GH-5940.
2020-08-07 14:37:27 +02:00
Nikita Popov
2cbc94097e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79934: CRLF-only line in heredoc causes parsing error
2020-08-06 12:03:57 +02:00
Pieter van den Ham
06ade15528 Fix #79934: CRLF-only line in heredoc causes parsing error
Fixes the function `next_newline()` in zend_language_scanner.l. The
function now correctly returns a newline_len of 2 for "\r\n".

Closes GH-5944.
2020-08-06 12:02:54 +02:00
Nikita Popov
6bf8ff6d97 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79930
2020-08-05 15:44:00 +02:00
Nikita Popov
da786a22af Fixed bug #79930
We're inserting src_zval, so that's what we should addref.
2020-08-05 15:43:41 +02:00
Christoph M. Becker
c4677af67e [ci skip] Fix 7.3.21 release date 2020-08-04 12:31:24 +02:00
Christoph M. Becker
6f0c3386d4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Add missing NEWS entries
2020-08-03 11:19:44 +02:00
Christoph M. Becker
17d64af186 [ci skip] Add missing NEWS entries 2020-08-03 11:18:18 +02:00
Christoph M. Becker
fce8061ede Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79919: Stack use-after-scope in define()
2020-07-31 10:57:02 +02:00
Christoph M. Becker
1e0bc6e30f Fix #79919: Stack use-after-scope in define()
Instead of the temporary `rv`, we use the `val_free` which is there for
this purpose.
2020-07-31 10:54:41 +02:00
Christoph M. Becker
2bcc419800 Fix #73060: php failed with error after temp folder cleaned up
Instead of storing the mapping base address and the address of
`execute_ex()` in a separate file in the temporary folder, we store
them right at the beginning of the memory mapping.
2020-07-29 18:21:05 +02:00
Christoph M. Becker
826b90a5f0 Revert "Merge branch 'PHP-7.3' into PHP-7.4"
This reverts commit e1f6ab3388, reversing
changes made to e0ebe56ebf.

There are obviously issues with running tests in parallel, maybe
related to the cache ID.  This needs to be investigated.  Revert for
now.
2020-07-29 13:32:59 +02:00
Nikita Popov
678f5b6068 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79895: support = in PHP_CHECK_GCC_ARG m4 macro
2020-07-29 12:39:30 +02:00
Santiago M. Mola
e767ca60a0 Fix #79895: support = in PHP_CHECK_GCC_ARG m4 macro
Closes GH-5890.
2020-07-29 12:36:52 +02:00
Christoph M. Becker
e1f6ab3388 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #73060: php failed with error after temp folder cleaned up
2020-07-29 10:11:29 +02:00
Christoph M. Becker
9a744c66e7 Fix #73060: php failed with error after temp folder cleaned up
Instead of storing the mapping base address and the address of
`execute_ex()` in a separate file in the temporary folder, we store
them right at the beginning of the memory mapping.
2020-07-29 10:07:23 +02:00
Christoph M. Becker
e0ebe56ebf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79806: realpath() erroneously resolves link to link
2020-07-28 14:00:52 +02:00
Christoph M. Becker
c756f82c02 Fix #79806: realpath() erroneously resolves link to link
After resolving reparse points, the path still may be a reparse point;
in that case we have to resolve that reparse point as well.
2020-07-28 13:55:22 +02:00
Côme Chilliet
1ba88355d7 Updated NEWS 2020-07-28 10:28:31 +02:00
Paweł Tomulik
efe6d96b45 fix memory leaks in ext/ldap/ldap.c 2020-07-28 10:23:10 +02:00
Christoph M. Becker
f02507469d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Revert "Fix #79806: realpath() erroneously resolves link to link"
2020-07-27 17:51:56 +02:00
Christoph M. Becker
1aeff522b8 Revert "Fix #79806: realpath() erroneously resolves link to link"
This reverts commit d5b59b4303.
2020-07-27 17:50:41 +02:00
Christoph M. Becker
85a26fef11 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79806: realpath() erroneously resolves link to link
2020-07-27 15:10:22 +02:00
Christoph M. Becker
d5b59b4303 Fix #79806: realpath() erroneously resolves link to link
After resolving reparse points, the path still may be a reparse point;
in that case we have to resolve that reparse point as well.
2020-07-27 15:08:39 +02:00
Christoph M. Becker
68aa1329eb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77932: File extensions are case-sensitive
2020-07-27 11:54:54 +02:00
Christoph M. Becker
6f18d7e2f9 Fix #77932: File extensions are case-sensitive
The file extension to mime type mapping *must* not depend on the file
extension's case for case-insensitive file systems, and *should* not
for case-sensitive file systems.
2020-07-27 11:52:18 +02:00
Christoph M. Becker
3deb6b555a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79884: PHP_CONFIG_FILE_PATH is meaningless
2020-07-23 15:41:20 +02:00
Christoph M. Becker
15efb96d4c Fix #79884: PHP_CONFIG_FILE_PATH is meaningless
It does not make sense to make assumptions about `PHP_CONFIG_FILE_PATH`
during build time, since that value is never used during run time on
Windows.  Since there is no `--with-config-file-path` on Windows
either, we define `PHP_CONFIG_FILE_PATH` as `""`.
2020-07-23 15:39:22 +02:00
Nikita Popov
657a832a77 Fixed bug #79881 2020-07-22 10:21:24 +02:00
Derick Rethans
973be68c63 Prepare for 7.4.10 2020-07-21 09:23:51 +01:00
Christoph M. Becker
2c0a6977dd 7.3 is now 7.3.22-dev 2020-07-21 09:18:07 +02:00
Christoph M. Becker
4b96a75ffd Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #63527: DCOM does not work with Username, Password parameter
2020-07-20 14:44:18 +02:00
Christoph M. Becker
b2e3fd1e69 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.
2020-07-20 14:43:29 +02:00