1
0
mirror of https://github.com/php/php-src.git synced 2026-04-10 01:23:53 +02:00
Commit Graph

14074 Commits

Author SHA1 Message Date
Pierrick Charron
09f9d24ba3 Prepare PHP 8.2.0 RC7 2022-11-22 13:00:04 -05:00
Pierrick Charron
dfe9a8d508 Revert "Update NEWS for PHP 8.2.0"
This reverts commit 3ca0fcde72.
2022-11-22 12:36:23 -05:00
Pierrick Charron
3ca0fcde72 Update NEWS for PHP 8.2.0 2022-11-08 17:31:56 -05:00
Arnaud Le Blanc
94f6a0c1dc [ci skip] NEWS 2022-11-04 16:02:41 +01:00
Martin Schröder
fdd088fc81 Properly deal with internal attributes used on promoted properties.
Closes GH-9661
2022-11-03 14:29:22 +01:00
Christoph M. Becker
79d4fdad52 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix potential NULL pointer dereference Windows shm*() functions
2022-11-02 14:54:48 +01:00
Christoph M. Becker
8bf6266e65 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix potential NULL pointer dereference Windows shm*() functions
2022-11-02 14:53:30 +01:00
Christoph M. Becker
d1c9ff5642 Fix potential NULL pointer dereference Windows shm*() functions
`shm_get()` (not to be confused with `shmget()`) returns `NULL` if
reallocation fails; we need to cater to that when calling the function.

Closes GH-9872.
2022-11-02 14:51:59 +01:00
Jakub Zelenka
eb9cf18703 Merge branch 'PHP-8.1' into PHP-8.2 2022-10-30 11:46:06 +00:00
Jakub Zelenka
29f7c4613e Merge branch 'PHP-8.0' into PHP-8.1 2022-10-30 11:43:11 +00:00
Jakub Zelenka
1c5844aa3e Fix GH-9754: SaltStack hangs when running php-fpm 8.1.11
SaltStack uses Python subprocess and redirects stderr to stdout which is
then piped to the returned output. If php-fpm starts in daemonized mode,
it should close stderr. However a fix introduced in GH-8913 keeps stderr
around so it can be later restored. That causes the issue reported in
GH-9754. The solution is to keep stderr around only when php-fpm runs in
foreground as the issue is most likely visible only there. Basically
there is no need to restore stderr when php-fpm is daemonized.
2022-10-30 11:41:33 +00:00
Tim Düsterhus
7f0b228f48 Fix pre-PHP 8.2 compatibility for php_mt_rand_range() with MT_RAND_PHP (#9839)
* Fix pre-PHP 8.2 compatibility for php_mt_rand_range() with MT_RAND_PHP

As some left-over comments indicated:

> Legacy mode deliberately not inside php_mt_rand_range()
> to prevent other functions being affected

The broken scaler was only used for `php_mt_rand_common()`, not
`php_mt_rand_range()`. The former is only used for `mt_rand()`, whereas the
latter is used for `array_rand()` and others.

With the refactoring for the introduction of ext/random `php_mt_rand_common()`
and `php_mt_rand_range()` were accidentally unified, thus introducing a
behavioral change that was reported in FakerPHP/Faker#528.

This commit moves the checks for `MT_RAND_PHP` from the general-purpose
`range()` function back into `php_mt_rand_common()` and also into
`Randomizer::getInt()` for drop-in compatibility with `mt_rand()`.

* [ci skip] NEWS for `MT_RAND_PHP` compatibility
2022-10-28 16:52:43 +02:00
Kamil Tekiela
0db2e666a5 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add NEWS entry for #9841
2022-10-28 11:25:51 +01:00
Kamil Tekiela
bce12f4e57 Add NEWS entry for #9841 2022-10-28 11:23:37 +01:00
Kamil Tekiela
96049867d8 Add NEWS entry for #9841
Closes GH-9841
2022-10-27 18:29:17 +01:00
Remi Collet
c84d7cc27e move CVEs in 8.1.12 changelog 2022-10-26 17:10:29 +02:00
Remi Collet
db28ee8fd0 move CVEs in 8.0.25 changelog 2022-10-26 15:27:23 +02:00
Florian Sowade
b9474bf385 Don’t report arginfo violations on fake closures (#9823) 2022-10-26 12:21:41 +02:00
Florian Sowade
56c121cea2 Initialize run time cache in PDO methods (#9818)
Without the memset the memory was uninitialized and the new test segfaulted when accessing the memory in _zend_observe_fcall_begin().
2022-10-26 12:21:41 +02:00
Pierrick Charron
4ccc414961 [ci skip] Update NEWS for PHP 8.2.0RC6 2022-10-25 13:46:14 -04:00
Stanislav Malyshev
9855fdd21a Merge branch 'PHP-8.1' into PHP-8.2 2022-10-23 18:53:56 -06:00
Stanislav Malyshev
2caa79e963 Merge branch 'PHP-8.0' into PHP-8.1 2022-10-23 18:53:26 -06:00
Stanislav Malyshev
80ccaa3e36 Merge branch 'PHP-7.4' into PHP-8.0 2022-10-23 18:52:56 -06:00
Stanislav Malyshev
2669ed7d77 Update NEWS 2022-10-23 18:50:53 -06:00
Jakub Zelenka
b732d80329 Fix bug GH-9779: stream_copy_to_stream fail when dest in append mode 2022-10-23 12:40:22 +01:00
David Carlier
dbedb69f6a Merge branch 'PHP-8.1' into PHP-8.2 2022-10-23 00:46:46 +01:00
David Carlier
fe06c5ef60 Merge branch 'PHP-8.0' into PHP-8.1 2022-10-23 00:46:25 +01:00
Adam Saponara
45e224cf51 Fix GH-9709: Guard against current_execute_data==NULL in is_handle_exception_set 2022-10-23 00:46:05 +01:00
Bob Weinand
5e9654be03 Fixed missing run_time_cache for preloaded arena allocated internal functions
This effectively affected all preloaded enums, leading them to possibly share a run_time_cache__ptr slot with unrelated functions. (Given that these were not set again.)
This bugfix is not accompanied by a test, due to how hard to trigger it was and getting a crash also depends a lot on the precise alignment of whether a cache entry accidentally overlapping has been used etc.
2022-10-22 22:07:41 +00:00
Jakub Zelenka
cb3d5a772d Merge branch 'PHP-8.1' into PHP-8.2 2022-10-22 22:14:27 +01:00
Jakub Zelenka
ec844ccc3f Merge branch 'PHP-8.0' into PHP-8.1 2022-10-22 22:12:05 +01:00
Jakub Zelenka
fa1b6ab5db Fix GH-8430: OpenSSL compiled with old disgests does not build
Specifically no-md2, no-md4 or no-rmd160 were not supported
2022-10-22 22:11:05 +01:00
Jakub Zelenka
1ef65c1cf0 Clean up OpenSSL engine list when OpenSSL 1.0.2 used
Attempt to fix GH-8620.
2022-10-22 11:20:00 +01:00
Arnaud Le Blanc
6b35850139 [ci skip] NEWS 2022-10-22 10:45:09 +02:00
Arnaud Le Blanc
386bbf4655 [ci skip] NEWS 2022-10-22 10:44:37 +02:00
Arnaud Le Blanc
845c6b3b3b [ci skip] NEWS 2022-10-22 10:43:11 +02:00
Stanislav Malyshev
248f647724 Fix bug #81738 (buffer overflow in hash_update() on long parameter) 2022-10-20 23:57:35 -06:00
Christoph M. Becker
f5aaa8f187 Fix GH-9372: HY010 when binding overlong parameter
If `SQLPutData()` *fails*, we should not call `SQLParamData()` again,
because that yields the confusing `HY010` (Function sequence error).
Instead we properly handle `SQLPutData()` errors.

For the given case (paramter length > column length), some drivers let
`SQLPutData()` fail, while others do not.  Either behavior seems to
conform to the ODBC specification.  Anyhow, we do not want to silently
truncate the given parameter, since that would break the behavior for
drivers which do not fail, but still don't simply truncate the given
parameter.  So it is finally up to userland to avoid passing overlong
parameters – with this patch they at least get useful information about
the actual issue.

Closes GH-9541.
2022-10-19 11:37:05 +02:00
Derick Rethans
41a6a298d9 Update NEWS 2022-10-17 18:22:29 +01:00
Arnaud Le Blanc
2c25dfb440 [ci skip] NEWS 2022-10-16 12:46:25 +02:00
Arnaud Le Blanc
e3c40c6829 [ci skip] NEWS 2022-10-16 12:44:05 +02:00
Arnaud Le Blanc
f702f87f70 [ci skip] NEWS 2022-10-16 12:43:21 +02:00
Christoph M. Becker
aba82c74d9 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-9720: Null pointer dereference while serializing the response
2022-10-13 16:08:34 +02:00
Christoph M. Becker
24c297086d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9720: Null pointer dereference while serializing the response
2022-10-13 16:00:36 +02:00
Christoph M. Becker
e440e37fa8 Fix GH-9720: Null pointer dereference while serializing the response
When traversing the result array, we need to cater to `param_name`
possibly being `NULL`.  Prior to PHP 7.0.0, this was implicitly done
because `param_name` was of type `char*`.

Closes GH-9739.
2022-10-13 15:56:08 +02:00
Christoph M. Becker
3193c037d2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix potential heap corruption due to alignment mismatch
2022-10-13 11:48:07 +02:00
Christoph M. Becker
7e14d2466a Fix potential heap corruption due to alignment mismatch
The fix for bug 63327[1] changed the extra size of mysqlnd allocations
from `sizeof(size_t)` to the properly aligned values; however, the
allocation in `_mysqlnd_pestrdup()` has apparently been overlooked,
which (currently) causes detectable heap corruption when running
mysqli_get_client_stats.phpt on 32bit Windows versions.

[1] <338a47bb85>

Closes GH-9724.
2022-10-13 11:47:24 +02:00
Ben Ramsey
865161af33 PHP-8.1 is now for PHP 8.1.13-dev 2022-10-11 19:47:00 -04:00
David Carlier
c15fe51918 Fix GH-9653: does not inconditionally support copy_file_range on older kernels.
As mentioned in its manpage, it had been reworked in the 5.3 line to support cross filesystem interactions.
Closes #GH-9656
2022-10-11 21:47:34 +01:00
Gabriel Caruso
dd394b3dff Prepare for PHp 8.0.26 2022-10-11 15:24:53 +02:00