Initialize DataBuf with 0s => fix valgrind error

v0.27.3
Dan Čermák 7 years ago
parent 0f43d0f49d
commit 7d9ed33bde

@ -404,6 +404,7 @@ namespace Exiv2 {
throw Error(kerInvalidMalloc);
}
DataBuf buf((long)allocate); // allocate a buffer
std::memset(buf.pData_, 0, buf.size_);
std::memcpy(buf.pData_,dir.pData_+8,4); // copy dir[8:11] into buffer (short strings)
const bool bOffsetIsPointer = count*size > 4;

Loading…
Cancel
Save