Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion XMPFiles/source/FormatSupport/PSIR_Support.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class PSIR_FileWriter : public PSIR_Manager { // The leaf class for file-based r
{
// ! Gag! Transfer ownership of the dataPtr and rsrcName!
this->FreeData();
memcpy ( this, &in, sizeof(*this) ); // AUDIT: Use of sizeof(InternalRsrcInfo) is safe.
memcpy ( static_cast<void*>(this), &in, sizeof(*this) ); // AUDIT: Use of sizeof(InternalRsrcInfo) is safe.
*((void**)&in.dataPtr) = 0; // The pointer is now owned by "this".
*((void**)&in.rsrcName) = 0; // The pointer is now owned by "this".
};
Expand Down
2 changes: 1 addition & 1 deletion XMPFiles/source/FormatSupport/TIFF_Support.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ class TIFF_FileWriter : public TIFF_Manager { // The derived class for file-base
{
// ! Gag! Transfer ownership of the dataPtr!
this->FreeData();
memcpy ( this, &in, sizeof(*this) ); // AUDIT: Use of sizeof(InternalTagInfo) is safe.
memcpy ( static_cast<void*>(this), &in, sizeof(*this) ); // AUDIT: Use of sizeof(InternalTagInfo) is safe.
if ( this->dataLen <= 4 ) {
this->dataPtr = (XMP_Uns8*) &this->smallValue; // Don't use the copied pointer.
} else {
Expand Down