]> granicus.if.org Git - php/commit
Fix #69279: Compressed ZIP Phar extractTo() creates garbage files
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 18 Dec 2020 17:05:52 +0000 (18:05 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 19 Jan 2021 09:28:54 +0000 (10:28 +0100)
commit68f5289e9e84b12b1a9ad671657702ce9a65a1e1
treefca4944d7564ad8232a8431252e633d133cf8dd3
parent38ad37ad435511391e16983794022a8d1e7d6a14
Fix #69279: Compressed ZIP Phar extractTo() creates garbage files

When extracting compressed files from an uncompressed Phar, we must not
use the direct file pointer, but rather get an uncompressed file
pointer.

We also add a test to show that deflated and stored entries are
properly extracted.

This also fixes #79912, which appears to be a duplicate of #69279.

Co-authored-by: Anna Filina <afilina@gmail.com>
Closes GH-6599.
NEWS
ext/phar/phar_object.c
ext/phar/tests/bug69279.phpt [new file with mode: 0644]
ext/phar/tests/bug69279a.phpt [new file with mode: 0644]
ext/phar/tests/bug69279a.zip [new file with mode: 0644]
ext/phar/tests/bug79912.phpt [new file with mode: 0644]