Skip to content

Commit

Permalink
Merge pull request #1621 from sivaschenko/xmp-file-writer-fix
Browse files Browse the repository at this point in the history
Fixed segment length check for jpeg xmp writer
  • Loading branch information
sivaschenko authored Jul 21, 2020
2 parents e4aa457 + 38b38c2 commit f6711a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MediaGalleryMetadata/Model/Jpeg/FileWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __construct(
public function execute(FileInterface $file): void
{
foreach ($file->getSegments() as $segment) {
if (strlen($segment->getData()) > 0xfffd) {
if ($segment->getName() != 'CompressedImage' && strlen($segment->getData()) > 0xfffd) {
throw new LocalizedException(__('A Header is too large to fit in the segment!'));
}
}
Expand Down

0 comments on commit f6711a8

Please sign in to comment.