Niels Dossche
6cac6d49ce
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Fix assertion failures resulting in crashes with stream filter object parameters
2025-11-17 18:24:34 +01:00
Niels Dossche
48d80d2729
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix assertion failures resulting in crashes with stream filter object parameters
2025-11-17 18:24:13 +01:00
Niels Dossche
93ce0500aa
Fix assertion failures resulting in crashes with stream filter object parameters
...
This works for dynamic props but not for non-dynamic props due to the
missing INDIRECT handling.
Closes GH-20500.
2025-11-17 18:23:43 +01:00
Niels Dossche
c666d6b5d9
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Fix assertion failure when fseeking a phar file out of bounds
2025-11-15 14:34:21 +01:00
Niels Dossche
3a2868fb76
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix assertion failure when fseeking a phar file out of bounds
2025-11-15 14:33:58 +01:00
Niels Dossche
d9e40372fc
Fix assertion failure when fseeking a phar file out of bounds
...
In 61884c3b52 I added these FIXME comments after I noticed that this
would cause an assertion failure. At that time I did not yet know what
to do here. I took a look at the code now and other streams return -1
and leave the file position untouched. So we do the same for phar.
This fixes the assertion failure and subsequent crashes, but also
changes one test output. However, I believe the new test output is
correct.
Closes GH-20475.
2025-11-15 14:33:33 +01:00
Niels Dossche
7809d51918
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Revert "ext/phar: Voidify flush function as it always returns EOL"
phar: Fix broken return value of fflush() for phar file entries
2025-11-15 13:59:38 +01:00
Niels Dossche
08ec409f1b
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Fix broken return value of fflush() for phar file entries
2025-11-15 13:58:17 +01:00
Niels Dossche
fd5c14e682
Revert "ext/phar: Voidify flush function as it always returns EOL"
...
This reverts commit 2513258a2b .
2025-11-15 13:57:47 +01:00
Niels Dossche
2f9d86b677
phar: Fix broken return value of fflush() for phar file entries
...
The flush functions always return EOF, even in the success path.
The success path should return 0 to indicate success.
Closes GH-20474.
2025-11-15 13:56:06 +01:00
Niels Dossche
5087cf3001
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Fix GH-20435: SensitiveParameter doesn't work for named argument passing to variadic parameter
Fix GH-20442: Phar does not respect case-insensitiveness of __halt_compiler() when reading stub
2025-11-10 22:44:16 +01:00
Niels Dossche
3e715d3361
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-20435: SensitiveParameter doesn't work for named argument passing to variadic parameter
Fix GH-20442: Phar does not respect case-insensitiveness of __halt_compiler() when reading stub
2025-11-10 22:43:59 +01:00
Niels Dossche
4ee25395d5
Fix GH-20442: Phar does not respect case-insensitiveness of __halt_compiler() when reading stub
...
Functions are case insensitive. The flush code already takes this into
account by checking for the __halt_compiler() symbol in a case
insensitive manner; however the parsing code did not do that yet.
Closes GH-20445.
2025-11-10 22:42:32 +01:00
Niels Dossche
1dd866d89c
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Fix GH-20302: Freeing a phar alias may invalidate PharFileInfo objects
2025-10-31 08:07:28 +01:00
Niels Dossche
ae7117b177
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-20302: Freeing a phar alias may invalidate PharFileInfo objects
2025-10-31 08:05:01 +01:00
Niels Dossche
6fe40de6e3
Fix GH-20302: Freeing a phar alias may invalidate PharFileInfo objects
...
Closes GH-20345.
2025-10-31 08:04:25 +01:00
Niels Dossche
d3ee9aa870
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Make bug70417.phpt less flaky
2025-10-25 12:14:38 +02:00
Niels Dossche
e9c9b1fdcf
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Make bug70417.phpt less flaky
2025-10-25 12:14:19 +02:00
Niels Dossche
ed9529a7d3
Make bug70417.phpt less flaky
...
Closes GH-20287.
2025-10-25 12:13:58 +02:00
Niels Dossche
c4333a7951
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
phar: Fix memory leak when opening temp file fails while trying to open gzip-compressed archive
2025-10-21 20:04:42 +02:00
Niels Dossche
913327d1fb
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Fix memory leak when opening temp file fails while trying to open gzip-compressed archive
2025-10-21 20:04:36 +02:00
Niels Dossche
ce0df1a9d8
phar: Fix memory leak when opening temp file fails while trying to open gzip-compressed archive
...
`filterparams` can leak if `php_stream_fopen_tmpfile()` fails.
To solve this, move the temp file creation first.
Closes GH-20220.
2025-10-21 20:04:13 +02:00
Niels Dossche
d05f88e228
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
phar: Fix file descriptor leak in phar_zip_flush() on failure.
2025-10-21 19:36:42 +02:00
Niels Dossche
40efac0d6c
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Fix file descriptor leak in phar_zip_flush() on failure.
2025-10-21 19:36:30 +02:00
Niels Dossche
cc83761416
phar: Fix file descriptor leak in phar_zip_flush() on failure.
...
Closes GH-20228.
2025-10-21 19:36:08 +02:00
Niels Dossche
fba06d836a
Fix merge issue
2025-10-20 22:35:47 +02:00
Niels Dossche
90eabf57ab
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
phar: Fix memory leak when openssl polyfill returns garbage
2025-10-20 22:04:17 +02:00
Niels Dossche
4c043d89ec
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Fix memory leak when openssl polyfill returns garbage
2025-10-20 22:04:09 +02:00
Niels Dossche
020bbea8fd
phar: Fix memory leak when openssl polyfill returns garbage
...
Closes GH-20210.
2025-10-20 22:03:36 +02:00
Gina Peter Banyard
2bdc7459cf
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
ext/phar: use size_t type instead of int
2025-10-15 13:37:29 +01:00
Gina Peter Banyard
2c514202e1
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
ext/phar: use size_t type instead of int
2025-10-15 13:36:03 +01:00
Gina Peter Banyard
d36109bd71
ext/phar: use size_t type instead of int
2025-10-15 13:35:22 +01:00
Niels Dossche
722a8b04bb
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
phar: Fix memleak+UAF when opening temp stream in buildFromDirectory() fails
2025-10-13 21:02:47 +02:00
Niels Dossche
ffc548db09
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Fix memleak+UAF when opening temp stream in buildFromDirectory() fails
2025-10-13 21:02:39 +02:00
Niels Dossche
5a7c84f274
phar: Fix memleak+UAF when opening temp stream in buildFromDirectory() fails
...
Obvious memleak, but can also cause a UAF depending on destruction
ordering with lingering PCRE regex instances in the SPL objects.
Closes GH-20157.
2025-10-13 21:02:17 +02:00
Niels Dossche
5ce00197f4
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
phar: Fix more alias memory leaks
2025-10-13 18:51:32 +02:00
Niels Dossche
5e5883344a
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Fix more alias memory leaks
2025-10-13 18:50:59 +02:00
Niels Dossche
b529c77094
phar: Fix more alias memory leaks
...
Closes GH-20154.
2025-10-13 18:50:30 +02:00
Niels Dossche
32a0d94cc5
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
phar: Fix file descriptor/memory leak when opening central fp fails
2025-10-13 09:08:24 +02:00
Niels Dossche
f84605b2db
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Fix file descriptor/memory leak when opening central fp fails
2025-10-13 09:08:19 +02:00
Niels Dossche
c89f25bf69
phar: Fix file descriptor/memory leak when opening central fp fails
...
Closes GH-20145.
2025-10-13 09:07:37 +02:00
Niels Dossche
053d72e3e2
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
phar: Reduce code duplication wrt error handling in phar_parse_zipfile()
2025-10-12 23:52:41 +02:00
Niels Dossche
b3dd837bc4
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Reduce code duplication wrt error handling in phar_parse_zipfile()
2025-10-12 23:52:34 +02:00
Niels Dossche
f9aeb9e57c
phar: Reduce code duplication wrt error handling in phar_parse_zipfile()
...
The PHAR_ZIP_FAIL and PHAR_ZIP_FAIL_FREE macros are almost the same.
The reason the latter exists is because of a single error path where the
error message is on the heap and needs to be freed. Instead, use a stack
allocated variable for the error message so we can get rid of the
duplicate macro code. This stack variable is big enough as the messages
written by phar_verify_signature() are short.
Closes GH-20144.
2025-10-12 23:52:23 +02:00
Niels Dossche
7ad5146bc1
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
Fix memory leak in phar_parse_zipfile() error handling
2025-10-12 11:29:14 +02:00
Niels Dossche
29bfb43f59
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix memory leak in phar_parse_zipfile() error handling
2025-10-12 11:28:24 +02:00
Niels Dossche
416386acc4
Fix memory leak in phar_parse_zipfile() error handling
...
Closes GH-20134.
2025-10-12 11:28:01 +02:00
Niels Dossche
79b1419c0a
Merge branch 'PHP-8.4' into PHP-8.5
...
* PHP-8.4:
phar: Fix memory leak when setAlias() fails
2025-10-12 11:20:21 +02:00
Niels Dossche
7d3c7268da
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
phar: Fix memory leak when setAlias() fails
2025-10-12 11:20:16 +02:00
Niels Dossche
9216b8be8b
phar: Fix memory leak when setAlias() fails
...
Closes GH-20135.
2025-10-12 11:19:53 +02:00