Merge "Use HTTP method as hint for the locking mode of sqlite"
[lhc/web/wiklou.git] / includes / media / JpegMetadataExtractor.php
index 0bd01cd..8a26f60 100644 (file)
@@ -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 );
                        }
                }