Skip to content

Commit db014be

Browse files
kevinbackhousekmilos
authored andcommitted
Fix out-of-bounds read.
1 parent 3f0be35 commit db014be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/crwimage_int.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ const CrwMapping* CrwMap::crwMapping(uint16_t crwDir, uint16_t crwTagId) {
619619

620620
void CrwMap::decode0x0805(const CiffComponent& ciffComponent, const CrwMapping* /*pCrwMapping*/, Image& image,
621621
ByteOrder /*byteOrder*/) {
622-
auto s = Exiv2::toString(ciffComponent.pData());
622+
auto s = std::string(reinterpret_cast<const char*>(ciffComponent.pData()), ciffComponent.size());
623623
image.setComment(s);
624624
} // CrwMap::decode0x0805
625625

0 commit comments

Comments
 (0)