Use memmove, rather than memcpy, because memory regions might overlap.

main
Kevin Backhouse 4 years ago
parent 4aa701f47f
commit e34eacc467
No known key found for this signature in database
GPG Key ID: 9DD01852EE40366E

@ -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());
}
}

Loading…
Cancel
Save