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
Unsuppress phan issues, part 8
[lhc/web/wiklou.git]
/
includes
/
media
/
JpegMetadataExtractor.php
diff --git
a/includes/media/JpegMetadataExtractor.php
b/includes/media/JpegMetadataExtractor.php
index
0bd01cd
..
8a26f60
100644
(file)
--- a/
includes/media/JpegMetadataExtractor.php
+++ b/
includes/media/JpegMetadataExtractor.php
@@
-21,6
+21,8
@@
* @ingroup Media
*/
* @ingroup Media
*/
+use Wikimedia\XMPReader\Reader as XMPReader;
+
/**
* Class for reading jpegs and extracting metadata.
* see also BitmapMetadataHandler.
/**
* 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" );
}
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 );
}
}
fseek( $fh, $size['int'] - 2, SEEK_CUR );
}
}