X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fmedia%2FJpegMetadataExtractor.php;h=8a26f606f978c292ece3d2b4789cfac3b7920355;hb=c1c3302286deb92f3eb81a39b5ee61f8c413f5ad;hp=0bd01cd6c94142b3fdaff2bab1987df4c1581185;hpb=b610a3b617f7616b2f1db12498cbad5aeae12576;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/JpegMetadataExtractor.php b/includes/media/JpegMetadataExtractor.php index 0bd01cd6c9..8a26f606f9 100644 --- a/includes/media/JpegMetadataExtractor.php +++ b/includes/media/JpegMetadataExtractor.php @@ -21,6 +21,8 @@ * @ingroup Media */ +use Wikimedia\XMPReader\Reader as XMPReader; + /** * Class for reading jpegs and extracting metadata. * see also BitmapMetadataHandler. @@ -158,6 +160,8 @@ class JpegMetadataExtractor { if ( $size['int'] < 2 ) { throw new MWException( "invalid marker size in jpeg" ); } + // Note it's possible to seek beyond end of file if truncated. + // fseek doesn't report a failure in this case. fseek( $fh, $size['int'] - 2, SEEK_CUR ); } }