Fixes reading central directory of zip files
authorMatthias Schmidt <gravatronics@live.com>
Fri, 13 Dec 2013 16:02:23 +0000 (17:02 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 13 Dec 2013 16:02:23 +0000 (17:02 +0100)
wcfsetup/install/files/lib/system/io/Zip.class.php

index 320aacacb0b0b78a046ee6a94a41fc733a3ae9d4..dd0535de33dac9353a84523f0b3c418dca64e67b 100644 (file)
@@ -172,7 +172,7 @@ class Zip extends File implements IArchive {
                        $data['mtime'] = gmmktime($hour, $minute, $second, $month, $day, $year);
                        
                        $data += unpack('Vcrc32/VcompressedSize/Vsize/vfilenameLength/vextraFieldLength/vfileCommentLength/vdiskNo/vinternalAttr/vexternalAttr', $this->read(26));
-                       $data['offset'] = $this->readAndUnpack(4, 'v');
+                       $data['offset'] = $this->readAndUnpack(4, 'V');
                        $data['filename'] = $this->read($data['filenameLength']);
                        if (substr($data['filename'], -1) == '/') $data['type'] = 'folder';
                        else $data['type'] = 'file';