Skip to content

Commit aca8845

Browse files
Replace assert with enforce. (Fix for #2268)
1 parent e416548 commit aca8845

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)