dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add CollationFa"
[lhc/web/wiklou.git]
/
includes
/
utils
/
ZipDirectoryReader.php
diff --git
a/includes/utils/ZipDirectoryReader.php
b/includes/utils/ZipDirectoryReader.php
index
44815b4
..
212f325
100644
(file)
--- a/
includes/utils/ZipDirectoryReader.php
+++ b/
includes/utils/ZipDirectoryReader.php
@@
-26,7
+26,6
@@
*
* Only a functional interface is provided: ZipFileReader::read(). No access is
* given to object instances.
*
* Only a functional interface is provided: ZipFileReader::read(). No access is
* given to object instances.
- *
*/
class ZipDirectoryReader {
/**
*/
class ZipDirectoryReader {
/**
@@
-215,6
+214,10
@@
class ZipDirectoryReader {
$startPos = 0;
}
$startPos = 0;
}
+ if ( $this->getFileLength() === 0 ) {
+ $this->error( 'zip-wrong-format', "The file is empty." );
+ }
+
$block = $this->getBlock( $startPos );
$sigPos = strrpos( $block, "PK\x05\x06" );
if ( $sigPos === false ) {
$block = $this->getBlock( $startPos );
$sigPos = strrpos( $block, "PK\x05\x06" );
if ( $sigPos === false ) {