]> granicus.if.org Git - php/commitdiff
Fixed bug#52013 (Unable to decompress files in a compressed phar)
authorHannes Magnusson <bjori@php.net>
Mon, 29 Aug 2011 14:19:54 +0000 (14:19 +0000)
committerHannes Magnusson <bjori@php.net>
Mon, 29 Aug 2011 14:19:54 +0000 (14:19 +0000)
NEWS
ext/phar/phar.c

diff --git a/NEWS b/NEWS
index 95ecd88b04afea58ebe6cbe7f039fc8ab3f8c71f..d34da25b4be6d56e7f5b4d387eb1d7e696c2b288 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ PHP                                                                        NEWS
   . Fixed bug #52461 (Incomplete doctype and missing xmlns). 
     (virsacer at web dot de, Pierre)
 
+- Phar:
+  . Fixed bug#52013 (Unable to decompress files in a compressed phar). (Hannes)
+
 - NSAPI SAPI:
   . Don't set $_SERVER['HTTPS'] on unsecure connection (bug #55403). (Uwe
     Schindler)
index 70035c7a45a72196622833bdedd5dbac971b5de1..24d8c428afc1731e6c5fe225b1215663356f551b 100644 (file)
@@ -3103,9 +3103,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert,
                /* this will have changed for all files that have either changed compression or been modified */
                entry->offset = entry->offset_abs = offset;
                offset += entry->compressed_filesize;
-               phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote);
-
-               if (entry->compressed_filesize != wrote) {
+               if (phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote) == FAILURE) {
                        if (closeoldfile) {
                                php_stream_close(oldfile);
                        }