Fix infinite loop in JpegMetadataExtractor
authorBrion Vibber <brion@pobox.com>
Wed, 21 Feb 2018 22:45:35 +0000 (22:45 +0000)
committerBrion Vibber <brion@pobox.com>
Wed, 21 Feb 2018 23:31:15 +0000 (23:31 +0000)
commit225dae4ab511f6142fafb7a801fdb8ae14aa603f
tree8dd29f0d8bf4c63922f1fdc6c4eeb5fadf03bbec
parentd910b1e282edbc88b9690b81c19ca90b5cfa73c8
Fix infinite loop in JpegMetadataExtractor

One of the skip-over loops was missing an feof() check and could
cause infinite loops.

Includes test file created by truncating a tiny tiny .jpeg at
the right place...

With the fix, it doesn't loop but dies on an exception, which
is good!

Bug: T184048
Change-Id: Ica13d6b68c3c12f7ce414edd081bf0886714e465
includes/media/JpegMetadataExtractor.php
tests/phpunit/data/media/jpeg-xmp-loop.jpg [new file with mode: 0644]
tests/phpunit/includes/media/JpegMetadataExtractorTest.php