fix some msan (memory sanitizer) issues

This commit is contained in:
Erwin Coumans
2021-05-12 20:14:15 +00:00
parent 092b7bc3d9
commit 92fb2db0a3
6 changed files with 20 additions and 4 deletions

View File

@@ -333,6 +333,7 @@ void btBulletFile::parse(int verboseMode)
if (m_DnaCopy)
delete m_DnaCopy;
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64, 16);
memset(m_DnaCopy, 0, sBulletDNAlen64);
memcpy(m_DnaCopy, sBulletDNAstr64, sBulletDNAlen64);
parseInternal(verboseMode, m_DnaCopy, sBulletDNAlen64);
}