Use memmove, rather than memcpy, because memory regions might overlap.
This commit is contained in:
parent
4aa701f47f
commit
e34eacc467
@ -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…
Reference in New Issue
Block a user