Skip to content
/ exiv2 Public
forked from Exiv2/exiv2

Commit

Permalink
Replace assert with enforce. (Fix for Exiv2#2268)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse authored and antermin committed Mar 16, 2023
1 parent 5ee8103 commit 1506915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jp2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ namespace Exiv2
}

if (subBox.type == kJp2BoxTypeImageHeader) {
assert(subBox.length == 22);
enforce(subBox.length == 22, kerCorruptedMetadata);
// height (4), width (4), componentsCount (2), bpc (1)
uint8_t compressionType = data.pData_[11];
uint8_t unkC = data.pData_[12];
Expand Down

0 comments on commit 1506915

Please sign in to comment.