Fix XMP parser errors due to trailing nullchar
authorDerk-Jan Hartman <hartman.wiki@gmail.com>
Wed, 11 Sep 2019 22:12:22 +0000 (00:12 +0200)
committerTheDJ <hartman.wiki@gmail.com>
Wed, 11 Sep 2019 22:34:33 +0000 (22:34 +0000)
commit9ce26a564d066a33ba7ae2a6502e3d57e7e4d48b
tree1f2df4b65bf49ab8894610b759da13b0300441f2
parentf379b3f897d54623b6bb8e62fabdb64a7a6a6158
Fix XMP parser errors due to trailing nullchar

JPEG files can have trailing \0 chars at the end of the XMP value. Use
trim() to remove these from the string value.

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