Skip to content

Commit 1506915

Browse files
kevinbackhouseantermin
authored andcommitted
Replace assert with enforce. (Fix for Exiv2#2268)
1 parent 5ee8103 commit 1506915

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
@@ -507,7 +507,7 @@ namespace Exiv2
507507
}
508508

509509
if (subBox.type == kJp2BoxTypeImageHeader) {
510-
assert(subBox.length == 22);
510+
enforce(subBox.length == 22, kerCorruptedMetadata);
511511
// height (4), width (4), componentsCount (2), bpc (1)
512512
uint8_t compressionType = data.pData_[11];
513513
uint8_t unkC = data.pData_[12];

0 commit comments

Comments
 (0)