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 "Block same-file reuploads"
[lhc/web/wiklou.git]
/
includes
/
media
/
PNGMetadataExtractor.php
diff --git
a/includes/media/PNGMetadataExtractor.php
b/includes/media/PNGMetadataExtractor.php
index
d0517d7
..
c12ca0b
100644
(file)
--- a/
includes/media/PNGMetadataExtractor.php
+++ b/
includes/media/PNGMetadataExtractor.php
@@
-121,6
+121,8
@@
class PNGMetadataExtractor {
if ( !$buf || strlen( $buf ) < $chunk_size ) {
throw new Exception( __METHOD__ . ": Read error" );
}
if ( !$buf || strlen( $buf ) < $chunk_size ) {
throw new Exception( __METHOD__ . ": Read error" );
}
+ $width = unpack( 'N', substr( $buf, 0, 4 ) )[1];
+ $height = unpack( 'N', substr( $buf, 4, 4 ) )[1];
$bitDepth = ord( substr( $buf, 8, 1 ) );
// Detect the color type in British English as per the spec
// https://www.w3.org/TR/PNG/#11IHDR
$bitDepth = ord( substr( $buf, 8, 1 ) );
// Detect the color type in British English as per the spec
// https://www.w3.org/TR/PNG/#11IHDR