X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FPNGMetadataExtractor.php;h=c12ca0bf10414b61a8ce7c7a7393bc8d4b7b8658;hb=3b4c53b79540e1ab4519cb7781d3da6cdf8af7b7;hp=d0517d7a56ccebdae25a02dabf935063b7d3dd8c;hpb=c99b37bdc05650a38b44f18429437bab6ecc91a8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/PNGMetadataExtractor.php b/includes/media/PNGMetadataExtractor.php index d0517d7a56..c12ca0bf10 100644 --- 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" ); } + $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