summaryrefslogtreecommitdiffstats
path: root/system/libraries/Zip.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2021-02-21 11:18:58 +0100
committerFlorian Pritz <bluewind@xinu.at>2021-02-21 11:18:58 +0100
commit08510ba2faa4785339ca7093ba0fa7052ff5d0c8 (patch)
tree108365fe3624295d70a677642b300fd458e7c569 /system/libraries/Zip.php
parent29e6c8ad462a426f4bc6d380646e434e3361a21d (diff)
parent0925b5099919300a239909588351a6482c5e792d (diff)
PHP8: Merge remote-tracking branch 'upstream/3.1-stable' into dev
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'system/libraries/Zip.php')
-rw-r--r--system/libraries/Zip.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index c0a14023d..e99873ae7 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Encryption
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/zip.html
+ * @link https://codeigniter.com/userguide3/libraries/zip.html
*/
class CI_Zip {
@@ -406,13 +406,14 @@ class CI_Zip {
return FALSE;
}
- return $this->zipdata
- .$this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00"
+ // @see https://github.com/bcit-ci/CodeIgniter/issues/5864
+ $footer = $this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00"
.pack('v', $this->entries) // total # of entries "on this disk"
.pack('v', $this->entries) // total # of entries overall
.pack('V', self::strlen($this->directory)) // size of central dir
.pack('V', self::strlen($this->zipdata)) // offset to start of central dir
."\x00\x00"; // .zip file comment length
+ return $this->zipdata.$footer;
}
// --------------------------------------------------------------------