1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3' into PHP-8.4

* PHP-8.3:
  Fix memory leak in phar_parse_zipfile() error handling
This commit is contained in:
Niels Dossche
2025-10-12 11:28:24 +02:00
2 changed files with 7 additions and 3 deletions

1
NEWS
View File

@@ -20,6 +20,7 @@ PHP NEWS
- Phar:
. Fix memory leak of argument in webPhar. (nielsdos)
. Fix memory leak when setAlias() fails. (nielsdos)
. Fix memory leak in phar_parse_zipfile() error handling. (nielsdos)
- Random:
. Fix Randomizer::__serialize() w.r.t. INDIRECTs. (nielsdos)

View File

@@ -673,7 +673,8 @@ foundit:
}
}
if (!entry.uncompressed_filesize || !actual_alias) {
if (!entry.uncompressed_filesize) {
efree(actual_alias);
php_stream_filter_remove(filter, 1);
pefree(entry.filename, entry.is_persistent);
PHAR_ZIP_FAIL("unable to read in alias, truncated");
@@ -706,7 +707,8 @@ foundit:
}
}
if (!entry.uncompressed_filesize || !actual_alias) {
if (!entry.uncompressed_filesize) {
efree(actual_alias);
php_stream_filter_remove(filter, 1);
pefree(entry.filename, entry.is_persistent);
PHAR_ZIP_FAIL("unable to read in alias, truncated");
@@ -729,7 +731,8 @@ foundit:
}
}
if (!entry.uncompressed_filesize || !actual_alias) {
if (!entry.uncompressed_filesize) {
efree(actual_alias);
pefree(entry.filename, entry.is_persistent);
PHAR_ZIP_FAIL("unable to read in alias, truncated");
}