1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Commit Graph

143800 Commits

Author SHA1 Message Date
Daniel Scherzer
77aa1cf1d3 Update versions for PHP 8.5.2RC1 php-8.5.2RC1 2025-12-30 14:22:57 -08:00
Calvin Buckley
21706fad8d Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  PHP 8.4 is now for PHP 8.4.18-dev
2025-12-30 16:55:41 -04:00
Calvin Buckley
5726e53b39 PHP 8.4 is now for PHP 8.4.18-dev 2025-12-30 13:07:11 -04:00
Jakub Zelenka
a403afab65 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  PHP-8.3 is now for PHP-8.3.31
2025-12-30 13:16:00 +01:00
Jakub Zelenka
5ee2add76b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  PHP-8.3 is now for PHP-8.3.31
2025-12-30 13:15:22 +01:00
Jakub Zelenka
404b4c816a PHP-8.3 is now for PHP-8.3.31 2025-12-30 13:14:00 +01:00
Bob Weinand
f754ffa8b2 Fixed bug GH-20745 ("Casting out of range floats to int" applies to strings) (#20746)
This reverts the warning for float-strings, to whose it never should have been applied in the first place.
2025-12-29 21:29:08 +01:00
Alexandre Daubois
de61d83b0a Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix variable assignment for PHP argument escaping in `run-tests.php` (#20799)
2025-12-29 14:50:34 +01:00
Alexandre Daubois
edf4cc40bd Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix variable assignment for PHP argument escaping in `run-tests.php` (#20799)
2025-12-29 14:50:19 +01:00
Sharad Chandran R
7effcab2cf Fix variable assignment for PHP argument escaping in run-tests.php (#20799) 2025-12-29 14:49:21 +01:00
Niels Dossche
4f9a39ea78 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-19962: arrayIndexThenCheck static analysis warning in firebird
2025-12-28 13:09:13 +01:00
Niels Dossche
29e04acc6f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19962: arrayIndexThenCheck static analysis warning in firebird
2025-12-28 13:09:05 +01:00
Niels Dossche
bae78c614a Fix GH-19962: arrayIndexThenCheck static analysis warning in firebird
Same as ce534c612b.
2025-12-28 13:08:40 +01:00
Niels Dossche
576d61493b Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-19961: Static analysis arrayIndexThenCheck warning in firebird (#20790)
2025-12-28 13:04:34 +01:00
Niels Dossche
fa8bb98ec0 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19961: Static analysis arrayIndexThenCheck warning in firebird (#20790)
2025-12-28 13:04:27 +01:00
Niels Dossche
ce534c612b Fix GH-19961: Static analysis arrayIndexThenCheck warning in firebird (#20790)
Static analysis reports that the bounds check comes after reading the
byte from the buffer.
In practice, this is tagged data that loops until the end tag is found
and therefore there isn't really a bug. The extra length check is only
there for extra hardening.
So we simply silence the static analysers and improve the hardening.

See also https://docwiki.embarcadero.com/InterBase/15/en/Isc_dsql_sql_info()
2025-12-28 13:04:16 +01:00
Niels Dossche
6e733a2bd0 Fix zlib test for 8.5+ 2025-12-28 01:32:21 +01:00
Niels Dossche
42f51528da Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix OOB gzseek() causing assertion failure
2025-12-28 00:22:12 +01:00
Niels Dossche
dabcd74524 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix OOB gzseek() causing assertion failure
2025-12-28 00:21:56 +01:00
Niels Dossche
2709ebc0ce Fix OOB gzseek() causing assertion failure
Closes GH-20785.
2025-12-28 00:21:32 +01:00
Máté Kocsis
324db3a77a Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  fix: Allow variadic syntax in PHPDoc parameter annotation in `gen_stub.php` (#20342)
2025-12-27 13:00:29 +01:00
Máté Kocsis
14d8e84236 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  fix: Allow variadic syntax in PHPDoc parameter annotation in `gen_stub.php` (#20342)
2025-12-27 12:54:04 +01:00
Michael Telgmann
09cb5ad442 fix: Allow variadic syntax in PHPDoc parameter annotation in gen_stub.php (#20342)
Closes #20277

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2025-12-27 12:53:15 +01:00
Niels Dossche
4ed8fce458 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20582: Heap Buffer Overflow in iptcembed
2025-12-26 22:44:35 +01:00
Niels Dossche
48b4289dff Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20582: Heap Buffer Overflow in iptcembed
2025-12-26 22:44:14 +01:00
Niels Dossche
99ed66b49f Fix GH-20582: Heap Buffer Overflow in iptcembed
If you can extend the file between the file size gathering (resulting in
a buffer allocation), and reading / writing to the file you can trigger a
TOC-TOU where you write out of bounds.
To solve this, add extra bound checks and make sure that write actions
always fail when going out of bounds.
The easiest way to trigger this is via a pipe, which is used in the
test, but it should be possible with a regular file and a quick race
condition as well.

Closes GH-20591.
2025-12-26 22:43:45 +01:00
Niels Dossche
31ae40d5e1 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20444: Dom\XMLDocument::C14N() seems broken compared to DOMDocument::C14N()
2025-12-26 22:28:51 +01:00
Niels Dossche
40c291cf93 Fix GH-20444: Dom\XMLDocument::C14N() seems broken compared to DOMDocument::C14N()
C14N code expects namespace to be in-tree, but we store namespaces in a
different way out-of-tree to avoid reconciliations that break the tree
structure in a way unexpected by the DOM spec. In the DOM spec,
namespace nodes don't exist; they're regular attributes.
To solve this, we temporarily make fake namespace nodes that we later
remove.

Closes GH-20457.
2025-12-26 22:27:25 +01:00
Máté Kocsis
dc5de5d419 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  gen_stub: Fix php-parser package download (#20775)
2025-12-25 21:10:49 +01:00
Giovanni Giacobbi
7d4ba80705 gen_stub: Fix php-parser package download (#20775)
If the system wgetrc has the `content-disposition = on` option, the file is
actually saved as `PHP-Parser-5.0.0.tar.gz`, causing a subsequent failure.

Even with `content-disposition = off`, if for any reason the download file
already exists and is corrupted, it won't be overwritten, and a new file
such as `v5.0.0.tar.gz.1` is saved instead.

We solve both problems by enforcing the name of the downloaded file.

Also, if for any other reason the unpacking should fail, remove the created
directory to allow further attempts.
2025-12-25 21:10:29 +01:00
Gina Peter Banyard
9de37a33a6 Merge branch 'PHP-8.4' into PHP-8.5 2025-12-25 19:43:44 +01:00
Gina Peter Banyard
20f9772063 ext/standard: Fix memory leak in mail() when header key is numeric
Closes GH-20776
2025-12-25 19:42:31 +01:00
David Carlier
37fe144333 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/pcntl: fix pcntl_getcpuaffinity() for solaris.
2025-12-24 16:10:34 +00:00
David Carlier
5faa54d93b ext/pcntl: fix pcntl_getcpuaffinity() for solaris.
trusting the call to handle invalid process id via errnos.

see https://github.com/php/php-src/pull/20709#discussion_r2630221301 for
rationale.

close GH-20731
2025-12-24 16:10:13 +00:00
Niels Dossche
ded206ee16 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix NEWS formatting
2025-12-24 13:30:09 +01:00
Niels Dossche
7f56d4a23f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix NEWS formatting
2025-12-24 13:29:45 +01:00
Niels Dossche
494dd97521 Fix NEWS formatting 2025-12-24 13:29:23 +01:00
Niels Dossche
13d63d6105 Fix GH-20771: Assertion failure when getUnicodeHost() returns empty string
If nothing was added to a smart_str, the interned empty string is
returned, and therefore ZVAL_NEW_STR is wrong as it'll set the
REFCOUNTED flag.

Closes GH-20773.
2025-12-23 23:17:53 +01:00
Michael Orlitzky
0eb6a4d32f ext/session/mod_mm.c: add a few missing ZSTR macros
In eaee504c the session's save_path global was changed to a
zend_string pointer, but there are a few direct char-pointer accesses
in ext/session/mod_mm.c that slipped through the cracks. GCC-15
notices them and fails to build due to the incompatible pointer types.
Three ZSTR_* wrappers are all that is needed.

Gentoo-Bug: https://bugs.gentoo.org/967862

Closes GH-20772.
2025-12-23 23:17:07 +01:00
Niels Dossche
0f01a01141 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [ci skip] Add missing EXTENSIONS dependency to test
2025-12-23 11:27:41 +01:00
Niels Dossche
8c860ce66e [ci skip] Add missing EXTENSIONS dependency to test 2025-12-23 11:27:34 +01:00
Ilija Tovilo
ffc4701009 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Drop CI for 8.1
2025-12-22 17:57:00 +01:00
Ilija Tovilo
f46741e554 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Drop CI for 8.1
2025-12-22 17:56:53 +01:00
Ilija Tovilo
f3b9482ed5 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Drop CI for 8.1
2025-12-22 17:56:39 +01:00
Ilija Tovilo
4d9a038fd0 [skip ci] Drop CI for 8.1 2025-12-22 17:56:03 +01:00
David Carlier
fd1e73078c Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/posix: (Further) fix groups array creation on macos.
2025-12-22 12:55:16 +00:00
David Carlier
250fd02851 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/posix: (Further) fix groups array creation on macos.
2025-12-22 12:54:36 +00:00
David Carlier
e63dae2941 ext/posix: (Further) fix groups array creation on macos.
With macos Tahoe and clang "17.0.0" (Xcode) the ext/posix/tests/posix_getgrgid_macosx.phpt test crashes as follow:

ext/posix/posix.c:681:19: runtime error: load of misaligned address 0x60800000e972 for type 'char **', which requires 8 byte alignment
0x60800000e972: note: pointer points here
70 00  2a 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00
seems memcpy had been translated to a load instruction ?
anyhow, we force to copy a "proper" char * source.

close GH-20744
2025-12-22 12:53:53 +00:00
Arnaud Le Blanc
c5f3614a45 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix zend_vm_gen.php when executed with PHP 8.5
2025-12-22 12:51:40 +01:00
Arnaud Le Blanc
2100ca08ec Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix zend_vm_gen.php when executed with PHP 8.5
2025-12-22 12:51:29 +01:00