1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

114192 Commits

Author SHA1 Message Date
Christoph M. Becker a64f48cff8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Update NEWS
  Fix test
  Fix bug #79329 - get_headers should not accept \0
  Fixed bug #79282
  Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
2020-03-17 10:30:57 +01:00
Stanislav Malyshev fc39bb9da9 [ci skip] Update NEWS 2020-03-16 22:40:48 -07:00
Stanislav Malyshev 1599f440a5 Fix test 2020-03-16 22:40:48 -07:00
Stanislav Malyshev 335547a04d Fix bug #79329 - get_headers should not accept \0 2020-03-16 22:40:48 -07:00
Stanislav Malyshev b9d32197cb Fixed bug #79282 2020-03-16 22:40:48 -07:00
Christoph M. Becker aa88f33f7d Fix #79283: Segfault in libmagic patch contains a buffer overflow
To solve this, we properly calculate the required string length upfront
instead of allocating an oversized string (`len * 4 + 4`).
2020-03-16 22:40:48 -07:00
Christoph M. Becker db848e1482 Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
We make sure that negative values are properly compared.
2020-03-16 22:40:48 -07:00
Stanislav Malyshev e71fa03107 [ci skip] Update NEWS 2020-03-16 22:40:00 -07:00
Stanislav Malyshev 62e7b80267 Fix test 2020-03-16 22:40:00 -07:00
Stanislav Malyshev 69fdc14152 Fix bug #79329 - get_headers should not accept \0 2020-03-16 22:40:00 -07:00
Stanislav Malyshev 25238bdf60 Fixed bug #79282 2020-03-16 22:40:00 -07:00
Christoph M. Becker 1fdffd1c55 Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
We make sure that negative values are properly compared.
2020-03-16 22:40:00 -07:00
Nikita Popov a57905dbac Don't specify ports in socket_export_stream-4.phpt
Let the system pick a free port instead...
2020-03-16 10:32:04 +01:00
Christoph M. Becker b48c05a982 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix typo in php.ini comment
2020-03-15 15:01:23 +01:00
Jacob Dreesen 68e2da6362 Fix typo in php.ini comment 2020-03-15 15:00:05 +01:00
Dmitry Stogov c5159b3832 Check asserts early 2020-03-12 22:26:30 +03:00
Dmitry Stogov b6492b4453 identation fix 2020-03-12 22:26:16 +03:00
Dmitry Stogov 3c6e9bed1a Call global code of preloaded script in global context 2020-03-12 22:19:47 +03:00
Dmitry Stogov 2dddab01ae Avoid "Anonymous class wasn't preloaded" error by lazely loading of not preloaded part of a preloaded script 2020-03-12 16:31:24 +03:00
Christoph M. Becker ddc3f3d595 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79199: curl_copy_handle() memory leak
2020-03-12 11:27:45 +01:00
Christoph M. Becker 2b5fc8e325 Fix #79199: curl_copy_handle() memory leak
`curl_copy_handle()` already registers a new resource, so we must not
increase the refcount of the original resource.
2020-03-12 11:23:53 +01:00
Christoph M. Becker 2b56735ea0 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #61597: SXE properties may lack attributes and content
2020-03-12 10:56:13 +01:00
Christoph M. Becker 7c081db885 Fix #61597: SXE properties may lack attributes and content
We must not treat a node as string if it has attributes, unless it is
an entity declaration which is always treated as string by simplexml.
2020-03-12 10:52:28 +01:00
Dmitry Stogov fee614f66b Export FFI::__BIGGEST_ALIGNMENT__ 2020-03-12 11:43:01 +03:00
Dmitry Stogov ecdaf83f5f Allow to fetch function address 2020-03-12 11:40:48 +03:00
Xinchen Hui 22c83454d6 Folder mark missed 2020-03-12 15:43:15 +08:00
Dmitry Stogov c45552e32b Export FFI::__BIGGEST_ALIGNMENT__ 2020-03-11 15:29:58 +03:00
Dmitry Stogov e902e4acd9 Allow to fetch function address 2020-03-11 15:13:27 +03:00
Christoph M. Becker 8657f03084 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78210: Invalid pointer address
2020-03-11 11:31:26 +01:00
Christoph M. Becker 53797c206a Fix #78210: Invalid pointer address
This is actually about three distinct issues:

* If an empty string is passed as $address to `stream_socket_sendto()`,
  the `sa` is not initialized, so we must not pass it as `addr` to
  `php_stream_xport_sendto()`.

* On POSIX, `recvfrom()` truncates messages which are too long to fit
  into the specified buffer (unless `MSG_PEEK` is given), discards the
  excessive bytes, and returns the buffer length.  On Windows, the same
  happens, but `recvfrom()` returns `SOCKET_ERROR` with the error code
  `WSAEMSGSIZE`.  We have to catch this for best POSIX compatibility.

* In `php_network_parse_network_address_with_port()`, we have to zero
  `in6` (not only its alias `sa`) to properly support IPv6.

Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
2020-03-11 11:30:15 +01:00
Christoph M. Becker a72b261db5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79364: When copy empty array, next key is unspecified
2020-03-11 08:55:28 +01:00
Christoph M. Becker 2462f2dab1 Fix #79364: When copy empty array, next key is unspecified
We must not forget to keep the `nNextFreeElement` when duplicating
empty arrays.
2020-03-11 08:54:05 +01:00
Peter Seiderer f73528f0e0 Check for sys/auxv.h before using it.
Fixes aarch64 compile with uclibc-ng (does not provide
sys/auxv.h header file).

Closes GH-5248.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
2020-03-10 16:53:57 +01:00
Christoph M. Becker fea2994ff8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Enclose INI values containing {TMP} in quotes
2020-03-09 22:51:11 +01:00
Christoph M. Becker d5e206620b Enclose INI values containing {TMP} in quotes
At least on Windows, the temporary directory may contain tilde signs,
which would result in an INI parse error.
2020-03-09 22:49:08 +01:00
Nikita Popov 760faa12b2 Fixed bug #79357
Peculiarly, for once the cause was not SOAPs "interesting" error
handling, but a bug in the call trampoline for internal functions...
2020-03-09 15:01:31 +01:00
Christoph M. Becker 02beefd5af PHP-7.4 is now 7.4.5-dev 2020-03-06 17:49:55 +01:00
Christoph M. Becker a595b82665 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Skip test on Windows if privileges are insufficient
2020-03-06 16:40:14 +01:00
Christoph M. Becker dc4f42508d Skip test on Windows if privileges are insufficient 2020-03-06 16:38:49 +01:00
Nikita Popov 979978cb61 Fix community job
Marco broke things again.
2020-03-06 11:43:35 +01:00
Nikita Popov c3ab8fd3f8 Add test for bug #63816
This has been fixed in PHP 7.4, add a test for it.
2020-03-06 11:16:47 +01:00
Christoph M. Becker b761997de3 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #75673: SplStack::unserialize() behavior
2020-03-06 09:11:10 +01:00
Christoph M. Becker b84277297a Fix #75673: SplStack::unserialize() behavior
Even though `SplStack::unserialize()` is not supposed to be called on
an already constructed instance, it is probably better if the method
clears the stack before actually unserializing.
2020-03-06 09:09:49 +01:00
Christoph M. Becker 04c9c4ae7d Fix intermittent test failures of windows_mb_path tests
Some of these tests create, use and later remove the same folder, so if
these are run in parallel, they may fail due to race conditions[1].  As
quick fix we add appropriate CONFLICTS clauses to prevent parallel
execution of the respective test groups.

[1] <https://ci.appveyor.com/project/php/php-src/builds/31213037/job/48rp13i0frf5t9hl#L5480>
2020-03-04 12:15:10 +01:00
Remi Collet b093bd6ae8 this test needs json 2020-03-03 13:06:31 +01:00
Derick Rethans dc3e3e64f2 PHP-7.4 is now 7.4.5-dev 2020-03-03 11:29:10 +00:00
Christoph M. Becker 22307b4c44 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Next is 7.3.17
2020-03-03 10:20:42 +01:00
Christoph M. Becker 9dda3b9eb2 Next is 7.3.17 2020-03-03 10:19:31 +01:00
Christoph M. Becker fc8b3ab7cb Fix #79013: Content-Length missing when posting a curlFile with curl
Unfortunately, some Webservers (e.g. IIS) do not implement the (F)CGI
specifications correctly wrt. chunked uploads (i.e. Transfer-encoding:
chunked), but instead pass -1 as CONTENT_LENGTH to the CGI
application. However, our (F)CFI SAPIs (i.e. cgi and cgi-fcgi) do not
support this.

Therefore we try to retrieve the stream size in advance and pass it to
`curl_mime_data_cb()` to prevent libcurl from doing chunked uploads.
This is basically the same approach that `curl_mime_filedata()`
implements, except that we are keeping already opened streams open for
the `read_cb()`.
2020-03-02 19:11:33 +01:00
Christoph M. Becker a0377021c5 Native Windows support for mysqlnd sha256 authentification
We implement that on top of Cryptography API: Next Generation (CNG).
2020-03-02 16:32:51 +01:00