Merge pull request #2190 from PhenomRetroShare/Fix_ValgrindErrorWithPrivateTrustPacketFWrite

Fix ValGrind error in PGPHandler::locked_writePrivateTrustDatabase
This commit is contained in:
csoler 2020-12-30 20:51:52 +01:00 committed by GitHub
commit 3d022504dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1864,6 +1864,8 @@ bool PGPHandler::locked_writePrivateTrustDatabase()
return false;
}
PrivateTrustPacket trustpacket ;
/* Clear PrivateTrustPacket struct to suppress valgrind warnings due to the compiler extra padding*/
memset(&trustpacket, 0, sizeof(PrivateTrustPacket));
for( std::map<RsPgpId,PGPCertificateInfo>::iterator it =
_public_keyring_map.begin(); it!=_public_keyring_map.end(); ++it )