Skip to content

Commit

Permalink
Merge pull request #2028 from kevinbackhouse/FixIssue2027
Browse files Browse the repository at this point in the history
Use memmove in TiffEncoder::updateDirEntry
  • Loading branch information
kevinbackhouse authored Dec 14, 2021
2 parents 13a2cf3 + e34eacc commit 29cc981
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tiffvisitor_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ namespace Exiv2 {
#endif
memset(buf + 8, 0x0, 4);
if (pTiffEntry->size() > 0) {
memcpy(buf + 8, pTiffEntry->pData(), pTiffEntry->size());
memmove(buf + 8, pTiffEntry->pData(), pTiffEntry->size());
memset(const_cast<byte*>(pTiffEntry->pData()), 0x0, pTiffEntry->size());
}
}
Expand Down
Binary file added test/data/issue_2027_poc.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 29cc981

Please sign in to comment.