Replace assert with enforce. (Fix for https://github.com/Exiv2/exiv2/issues/2268)

main
Kevin Backhouse 3 years ago
parent 6b5453c9d5
commit 0c3da129f2
No known key found for this signature in database
GPG Key ID: 9DD01852EE40366E

@ -475,7 +475,7 @@ void Jp2Image::printStructure(std::ostream& out, PrintStructureOption option, in
} }
if (subBox.type == kJp2BoxTypeImageHeader) { if (subBox.type == kJp2BoxTypeImageHeader) {
assert(subBox.length == 22); enforce(subBox.length == 22, ErrorCode::kerCorruptedMetadata);
// height (4), width (4), componentsCount (2), bpc (1) // height (4), width (4), componentsCount (2), bpc (1)
auto compressionType = data.read_uint8(11); auto compressionType = data.read_uint8(11);
auto unkC = data.read_uint8(12); auto unkC = data.read_uint8(12);

Loading…
Cancel
Save