Skip to content

Commit 0c3da12

Browse files
Replace assert with enforce. (Fix for #2268)
1 parent 6b5453c commit 0c3da12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jp2image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ void Jp2Image::printStructure(std::ostream& out, PrintStructureOption option, in
475475
}
476476

477477
if (subBox.type == kJp2BoxTypeImageHeader) {
478-
assert(subBox.length == 22);
478+
enforce(subBox.length == 22, ErrorCode::kerCorruptedMetadata);
479479
// height (4), width (4), componentsCount (2), bpc (1)
480480
auto compressionType = data.read_uint8(11);
481481
auto unkC = data.read_uint8(12);

0 commit comments

Comments
 (0)