mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-09-14 06:18:22 +00:00
fix some msan (memory sanitizer) issues
This commit is contained in:
@@ -75,6 +75,7 @@ bFile::bFile(const char *filename, const char headerString[7])
|
||||
fseek(fp, 0L, SEEK_SET);
|
||||
|
||||
mFileBuffer = (char *)malloc(mFileLen + 1);
|
||||
memset(mFileBuffer, 0, mFileLen+1);
|
||||
size_t bytesRead;
|
||||
bytesRead = fread(mFileBuffer, mFileLen, 1, fp);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user