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

@@ -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);