mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix memory leak in phar_parse_zipfile() error handling
Closes GH-20134.
This commit is contained in:
1
NEWS
1
NEWS
@@ -18,6 +18,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)
|
||||
|
||||
@@ -641,7 +641,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");
|
||||
@@ -674,7 +675,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");
|
||||
@@ -697,7 +699,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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user