1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Commit Graph

6287 Commits

Author SHA1 Message Date
Saki Takamachi 89010be7ec Update versions for PHP 8.4.14 2025-10-22 04:23:55 +09:00
Tim Düsterhus 08924cd8c4 Regenerate main/debug_gdb_scripts.c
Following 9d9b73a3f0 / GH-20077.
2025-10-06 20:45:14 +02:00
Niels Dossche 2edb369181 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19570: unable to fseek in /dev/zero and /dev/null
2025-10-06 18:16:37 +02:00
Niels Dossche b7aeb0a69f Fix GH-19570: unable to fseek in /dev/zero and /dev/null
On Linux, these two character devices are exceptions in that they can be
seeked. Check their major/minor device number.

Co-authored-by: divinity76 <hans@loltek.net>
2025-10-06 18:16:16 +02:00
Jakub Zelenka 57e1438ca5 Merge branch 'PHP-8.3' into PHP-8.4 2025-10-02 19:22:59 +02:00
Jakub Zelenka 288d698ce4 Prevent use after stack scope in stream strerr code (#20040) 2025-10-02 19:22:28 +02:00
Jakub Zelenka 10eb3d69c7 Merge branch 'PHP-8.3' into PHP-8.4 2025-10-02 13:43:47 +02:00
Jakub Zelenka a3c14d6ab4 Do not use errno_t as it is not defined on musl (#20037) 2025-10-02 13:42:11 +02:00
David Carlier 3193fe0728 Merge branch 'PHP-8.3' into PHP-8.4 2025-10-02 12:30:41 +01:00
David Carlier 175afc4085 Fix GH-19705: do not flush/write buffer on non writeable stream.
Co-authored-by: Jakub Zelenka <bukka@php.net>

close GH-19708
2025-10-02 12:28:36 +01:00
Niels Dossche 7dd7ad843d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17345: Bug #35916 was not completely fixed
2025-10-01 11:50:05 +02:00
Niels Dossche 0ffa337a54 Fix GH-17345: Bug #35916 was not completely fixed
Change the reproducer code in `bug35916.phpt` from `stream_bucket_append` to
`stream_bucket_prepend` and you have the same bug.
Furthermore, even in the append case the check is incorrect because the bucket
can already be in the brigade at a position other than the tail.
To solve this properly, unlink the brigade first and also use that as a
condition to manage the refcount.

Closes GH-18973.
2025-10-01 11:49:28 +02:00
Jakub Zelenka 152dfa8835 Merge branch 'PHP-8.3' into PHP-8.4 2025-10-01 11:12:42 +02:00
Jakub Zelenka b7fdfb7147 Fix GH-19248: Use strerror_r instead of strerror in main
Or on Windows it is going to use either FormatMessageW or strerror_s
for compatibility with previous error messages.

It also needs to accomodate for GNU and BSD versions of strerror_r
returning different type.

Closes GH-19251
2025-10-01 11:12:08 +02:00
David Carlier 03de7b0b28 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-29 22:48:38 +01:00
David Carlier 93bac8cb1a Fix GH-19922: gzopen() double free
close GH-19924
2025-09-29 22:47:29 +01:00
Arnaud Le Blanc 938226083e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19480: error_log php.ini cannot be unset when open_basedir is configured
2025-09-19 14:16:48 +02:00
Niels Dossche 7a1bb71127 Fix GH-19480: error_log php.ini cannot be unset when open_basedir is configured
Since the ini message handlers already check for basedir, we need to
drop the basedir check from ini_set. Then we also fix the exceptional
case for the empty string: it should bypass the basedir check.
Furthermore, there was a regression introduced with the error_log
"syslog" check in ddfe269a (inverted check), so we fix that as well.

Closes GH-19487
2025-09-19 14:14:53 +02:00
Jakub Zelenka c9cc68b9ed PHP-8.3 is now for PHP-8.3.27-dev 2025-09-09 23:02:24 +02:00
Calvin Buckley 635376d22d PHP 8.4 is now for PHP 8.4.14-dev 2025-09-09 11:37:59 -03:00
Niels Dossche 89f2805905 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix OSS-Fuzz #385993744
2025-09-08 19:10:41 +02:00
Niels Dossche ff84cb08ef Fix OSS-Fuzz #385993744
PSFS_FEED_ME is supposed to be returned when the filter did not receive
enough data and did not generate buckets for the output brigade.
The test generates buckets anyway on the output brigade, and the stream
layer did not handle that case causing a memory leak.
To solve this, discard any such buckets as it would conflict with the
status code returned by the filter. This keeps BC and solves the leak.

Closes GH-18972.
2025-09-08 19:10:22 +02:00
Niels Dossche ad129c6f97 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Remove incorrect call to zval_ptr_dtor() in user_wrapper_metadata()
2025-09-04 23:13:45 +02:00
Niels Dossche d10ff9bbd8 Remove incorrect call to zval_ptr_dtor() in user_wrapper_metadata()
This one is not initialized. This is not hittable from userspace code
because all locations within first-party php-src code have a valid
`option` argument.

Closes GH-19714.
2025-09-04 23:13:20 +02:00
Eric Mann a0bd2c9fcf PHP-8.3 is now for PHP 8.3.26-dev 2025-08-12 08:15:40 -07:00
Saki Takamachi b7c26eb16c PHP-8.4 is now for PHP 8.4.13-dev 2025-08-12 23:46:26 +09:00
Niels Dossche 1c74a1a889 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Free opened_path when opened_path_len >= MAXPATHLEN
2025-07-27 10:54:46 +02:00
dixyes 5dd965117a Free opened_path when opened_path_len >= MAXPATHLEN
Closes GH-19240.
2025-07-27 10:54:21 +02:00
Jakub Zelenka faf833bffc PHP 8.3 is now for PHP-8.3.25-dev 2025-07-16 14:09:24 +02:00
Calvin Buckley 3d468a181a PHP-8.4 is now for PHP 8.4.12-dev 2025-07-15 13:46:33 -03:00
Saki Takamachi d5fe1bce63 PHP-8.4 is now for PHP 8.4.11-dev 2025-07-02 11:39:33 +09:00
Jakub Zelenka cf0c39723e Fix GHSA-3cr5-j632-f35r: Null byte in hostnames
This fixes stream_socket_client() and fsockopen().

Specifically it adds a check to parse_ip_address_ex and it also makes
sure that the \0 is not ignored in fsockopen() hostname formatting.
2025-07-01 09:34:23 -07:00
Jakub Zelenka 5ef0dc7666 Fix GHSA-3cr5-j632-f35r: Null byte in hostnames
This fixes stream_socket_client() and fsockopen().

Specifically it adds a check to parse_ip_address_ex and it also makes
sure that the \0 is not ignored in fsockopen() hostname formatting.
2025-07-01 23:01:16 +09:00
Jakub Zelenka bbac59148c Merge branch 'PHP-8.3' into PHP-8.4 2025-06-21 20:16:13 +02:00
Jakub Zelenka a36b8fdc94 Fix GH-13264: fgets() and stream_get_line() do not return false on filter fatal error
This happens because there are no checks in php_stream_fill_read_buffer
calls. This should not fail always but only on fatal error so special
flag is needed for that.

Closes GH-18778
2025-06-21 20:13:09 +02:00
Eric Mann 50606f8569 PHP 8.3 is now for PHP 8.3.24-dev 2025-06-17 08:06:35 -07:00
Saki Takamachi a6749046f6 PHP-8.4 is now for PHP 8.4.10-dev 2025-06-17 21:05:02 +09:00
Niels Dossche 4f233e3ba2 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix technically incorrect sizeof
2025-06-09 22:05:21 +02:00
Niels Dossche fe3bea090e Fix technically incorrect sizeof
This doesn't actually matter because both `*sal` and `**sal` are pointer
sized, but this makes analysers happy.
Fixes bug #68866.

Closes GH-18816.
2025-06-09 22:05:09 +02:00
Jakub Zelenka 086a470208 Merge branch 'PHP-8.3' into PHP-8.4 2025-06-05 14:10:57 +02:00
Jakub Zelenka 42f6c15186 Fix bug #74796: Requests through http proxy set peer name
This issue happens because http wrapper sets peer_name but then does not
remove so it stays in the context. The fix removes the peer name from
the context after enabling crypto.

In addition to bug #74796, this also fixes bug #76196.

In addition it should be a final fix for those SOAP bugs:

bug #69783
bug #52913
bug #61463
2025-06-05 14:08:28 +02:00
Jakub Zelenka 8e2c2be7a5 PHP-8.3 is now for PHP 8.3.23-dev 2025-05-21 00:39:56 +02:00
Calvin Buckley 3e0a4259a8 PHP 8.4 is now for PHP-8.4.9-dev 2025-05-20 13:13:34 -03:00
Saki Takamachi 33b977e36b PHP-8.4 is now for PHP 8.4.8-dev 2025-04-22 22:23:08 +09:00
Eric Mann 2852177f4d PHP-8.3 is now for PHP 8.3.22-dev 2025-04-22 06:09:24 -07:00
Niels Dossche 29a5adc6af Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix some leaks in php_scandir
2025-04-21 13:21:12 +02:00
Niels Dossche 81d9a27c47 Fix some leaks in php_scandir
Closes GH-18371.
2025-04-21 13:20:45 +02:00
David Carlier dc93f28381 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-02 12:36:08 +01:00
David Carlier 2e47442a6b Fix GH-18212: fseek with SEEK_CUR and negative offset crash on debug
Triggers the assertion as with SEEK_CUR the stream position is set to a
negative value so we force the failure without affecting its position
instead.

close GH-18224
2025-04-02 12:34:50 +01:00
Arnaud Le Blanc 9b96ea1a99 GDB: Import gdb.printing
gdb.printing is not imported by default since version 16, for some reason
2025-03-27 16:31:28 +01:00