Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/jp2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ void Jp2Image::printStructure(std::ostream& out, PrintStructureOption option, si
case kJp2BoxType::FileTypeBox: {
// This box shall immediately follow the JPEG 2000 Signature box
/// \todo All files shall contain one and only one File Type box.
Internal::enforce(box.length >= boxHSize, ErrorCode::kerCorruptedMetadata);
Blob boxData(box.length - boxHSize);
io_->readOrThrow(boxData.data(), boxData.size(), ErrorCode::kerCorruptedMetadata);
if (!Internal::isValidBoxFileType(boxData))
Expand Down